public int GetStartingId()
 {
     try
     {
         return(_context.Set <T>().Select((r) => r.Id).Max() + 1);
     }
     catch (InvalidOperationException)
     {
         return(1);
     }
 }
Ejemplo n.º 2
0
 public EntityRepository(LeagueContext context)
 {
     Context = context;
     DbSet   = context.Set <TEntity>();
 }