public T GetById(Int32 id) { return(context.Set <T>() .Where(e => e.Id == id) .FirstOrDefault()); }
public GenericRepository(CMContext context) { Context = context; DbSet = Context.Set <TEntity>(); }
public T GetById(Int32 id) { return(context.Set <T>() .Where(e => e.Id == id) .FirstOrDefault()); }
public GenericRepository(CMContext context) { Context = context; DbSet = Context.Set <TEntity>(); }