Example #1
0
        public static RestrauntTaskerContext Create()
        {
            var options = new DbContextOptionsBuilder <RestrauntTaskerContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
                          .Options;

            var context = new RestrauntTaskerContext(options);

            RestrauntTaskerContextSeeder.Seed(context);

            return(context);
        }
Example #2
0
 public Repository(RestrauntTaskerContext context) =>
Example #3
0
 public static void RemoveContext(RestrauntTaskerContext context)
 {
     context.Database.EnsureCreated();
     context.Dispose();
 }
Example #4
0
 public UnitOfWork(RestrauntTaskerContext context) =>