示例#1
0
        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());
        }
示例#2
0
        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());
        }
示例#3
0
        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());
        }
示例#4
0
 public IEnumerable <Ticketing> List(TicketingQueryOptions <Ticketing> options)
 {
     throw new NotImplementedException();
 }