コード例 #1
0
        private BlogDbContextWithEntityImplementation GetContext()
        {
            var options = new DbContextOptionsBuilder <BlogDbContextWithEntityImplementation>()
                          .UseInMemoryDatabase(databaseName: "BlogPOC")
                          .Options;
            var context = new BlogDbContextWithEntityImplementation(options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();
            return(context);
        }
コード例 #2
0
 private BaseRepository <BaseEntityImplementation> GetRepository(BlogDbContextWithEntityImplementation context)
 {
     return(new BaseRepositoryImplementation(context));
 }
コード例 #3
0
 public BaseRepositoryImplementation(BlogDbContextWithEntityImplementation context) : base(context)
 {
 }