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);
        }
Esempio n. 2
0
 public PrestationRepository(ElegantGlamourDbContext context) : base(context)
 {
 }