public static YerbowoContext GetInMemory()
        {
            DbContextOptions <YerbowoContext> options;
            var builder = new DbContextOptionsBuilder <YerbowoContext>();

            builder.UseInMemoryDatabase("Yerbowo");
            options = builder.Options;
            YerbowoContext context = new YerbowoContext(options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();
            return(context);
        }
Example #2
0
 public AddressRepository(YerbowoContext db) : base(db)
 {
 }
Example #3
0
 public ProductRepository(YerbowoContext db) : base(db)
 {
 }
 public UserRepository(YerbowoContext db) : base(db)
 {
 }
Example #5
0
 public DbEntityRepository(YerbowoContext db)
 {
     _db = db;
 }