Beispiel #1
0
        public void BaseSetup()
        {
            _dbContextOptions = new DbContextOptionsBuilder()
                                .UseInMemoryDatabase(Guid.NewGuid().ToString())
                                .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking)
                                .Options;

            SeedDbContext();

            Mock <IShowNTellDbContextFactory> contextFactory = new Mock <IShowNTellDbContextFactory>();

            contextFactory.Setup(c => c.CreateDbContext()).Returns(() => GetDbContext());

            _contextFactory = contextFactory.Object;
        }
Beispiel #2
0
 public EFUserService(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
Beispiel #3
0
 public EFCommentService(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
 public EFRandomImagePostService(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
Beispiel #5
0
 public EFFollowService(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
 public EFSearchService(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
 public AdminDataSeeder(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }
 public EFProfileService(IShowNTellDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }