public virtual T Get(TicketingQueryOptions <T> options) { IQueryable <T> query = dbset; foreach (string include in options.getIncludes()) { query = query.Include(include); } if (options.HasWhere) { query = query.Where(options.Where); } return(query.FirstOrDefault()); }
public virtual IEnumerable <T> List(TicketingQueryOptions <T> options) { IQueryable <T> query = dbset; foreach (string include in options.getIncludes()) { query = query.Include(include); } if (options.HasWhere) { query = query.Where(options.Where); } if (options.HasOrderBy) { query = query.OrderBy(options.OrderBy); } return(query.ToList()); }
public IEnumerable <Ticketing> GetTickets(TicketingQueryOptions <Ticketing> options) { IQueryable <Ticketing> query = context.Ticketings; foreach (string include in options.getIncludes()) { query = query.Include(include); } if (options.HasWhere) { query = query.Where(options.Where); } if (options.HasOrderBy) { query = query.OrderBy(options.OrderBy); } return(query.ToList()); }
public IEnumerable <Ticketing> List(TicketingQueryOptions <Ticketing> options) { throw new NotImplementedException(); }