Ejemplo n.º 1
0
        public static ElegantGlamourDbContext GetElegantGlamourDbContext(string dbName)
        {
            // Create options for DbContext instance
            var options = new DbContextOptionsBuilder <ElegantGlamourDbContext>()
                          .UseInMemoryDatabase(databaseName: dbName)
                          .Options;

            // Create instance of DbContext
            var dbContext = new ElegantGlamourDbContext(options);

            ILoggerFactory loggerFactory = new LoggerFactory();

            // Add entities in memory
            dbContext.Seed(loggerFactory);

            return(dbContext);
        }
Ejemplo n.º 2
0
 public PrestationRepository(ElegantGlamourDbContext context) : base(context)
 {
 }