public List <Payment> GetAll(Expression <Func <Payment, bool> > filter = null) { using (CarRentalContext context = new CarRentalContext()) { return(filter == null ? context.Set <Payment>().ToList() : context.Set <Payment>().Where(filter).ToList()); } }
public Color Get(Expression <Func <Color, bool> > filter) { using (CarRentalContext context = new CarRentalContext()) { return(context.Set <Color>().SingleOrDefault(filter)); } }
public Payment Get(Expression <Func <Payment, bool> > filter) { using (CarRentalContext context = new CarRentalContext()) { return(context.Set <Payment>().SingleOrDefault(filter)); } }
public Brand Get(Expression <Func <Brand, bool> > filter) { using (CarRentalContext context = new CarRentalContext()) { return(context.Set <Brand>().SingleOrDefault(filter)); } }