public void Add(T entity, CityTransportContext context) { context.Set <T>().Add(entity); context.SaveChanges(); }
public IQueryable <T> Find(Expression <Func <T, bool> > predicate, CityTransportContext context) { return(context.Set <T>().Where(predicate)); }
public IQueryable <T> GetAll(CityTransportContext context) { return(context.Set <T>()); }
public void Delete(T entity, CityTransportContext context) { context.Set <T>().Remove(entity); context.SaveChanges(); }