You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.
I'm getting an inconstancy beta8 when using IServiceCollection, ServiceCollection, AddEntityFramework, & BuildServiceProvider
This is the full code
using System;
using Microsoft.Data.Entity.Infrastructure;
// Beta8
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
// RC
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Abstractions;
using Microsoft.Framework.DependencyInjection.Extensions;
namespace Tumboon.Domain.Functional.Test
{
public class TestHelper
{
protected TestHelper()
{
}
public static TestHelper Instance { get; } = new TestHelper();
public IServiceProvider CreateServiceProvider(IServiceCollection customService = null)
{
return CreateServiceProvider(customService, AddProviderServices);
}
private IServiceProvider CreateServiceProvider(IServiceCollection customServices,
Func<EntityFrameworkServicesBuilder, EntityFrameworkServicesBuilder> addProviderServices)
{
var services = new ServiceCollection();
addProviderServices(services.AddEntityFramework());
if (customServices != null)
foreach (var service in customServices)
{
services.Add(service);
}
return services.BuildServiceProvider();
}
public virtual EntityFrameworkServicesBuilder AddProviderServices(EntityFrameworkServicesBuilder builder)
{
return builder.AddInMemoryDatabase();
}
}
}
The text was updated successfully, but these errors were encountered:
Hey Guys
I'm getting an inconstancy beta8 when using
IServiceCollection
,ServiceCollection
,AddEntityFramework
, &BuildServiceProvider
This is the full code
The text was updated successfully, but these errors were encountered: