Ejemplo n.º 1
0
        public static async Task InitializeDbForTests(TorrentsContext context)
        {
            await context.Forums.AddRangeAsync(InitialEntities.Forums);

            await context.Torrents.AddRangeAsync(InitialEntities.Torrents);

            await context.Files.AddRangeAsync(InitialEntities.Files);

            await context.SaveChangesAsync();
        }
Ejemplo n.º 2
0
 public Repository(TorrentsContext context)
 {
     _context = context;
     _dbSet   = context.Set <TEntity>();
 }