Beispiel #1
0
        internal static IAuthorsRepository GetInMemoryAuthorRepository(string dbName)
        {
            var options = new DbContextOptionsBuilder <LibraryDbContext>()
                          .UseInMemoryDatabase(databaseName: dbName)
                          .Options;

            var dbContext = new LibraryDbContext(options);

            dbContext.FillAuthorsDb();

            return(new AuthorsRepository(dbContext));
        }