withSIX.Mini.Infra.Data.Services.DbContexts.ApiFactory C# (CSharp) Method

ApiFactory() private method

private ApiFactory ( ) : ApiContext
return ApiContext
        ApiContext ApiFactory() {
            var apiCtx = _apiCacheCreator();
            // Workaround for nasty issue where we get the DomainEventHandler from the same lazy instance during load :S
            _apiContext = new Lazy<IApiContext>(() => apiCtx);
            return apiCtx;
        }