public override IEnumerable <Restaurant> All() { return(RepositoryDbSet.AsQueryable() .Include(a => a.Address) .Include(a => a.RatingLogs) .ToList()); }
public async Task <int> CountDataAmount(string search) { var query = RepositoryDbSet.AsQueryable(); query = Search(query, search); return(await query.CountAsync()); }
public List <User> GetOrderedRecords(int recordLimit, bool orderByFirstName = true) { var query = RepositoryDbSet.AsQueryable(); query = orderByFirstName ? query.OrderBy(a => a.FirstName) : query.OrderBy(a => a.LastName); switch (recordLimit) { case 0: break; default: query = query.Take(count: recordLimit); break; } return(query.ToList()); }
public List <Ticket> GetOrderedRecords(int recordLimit, bool orderByDescription = true) { var query = RepositoryDbSet.AsQueryable(); query = orderByDescription ? query.OrderBy(a => a.Description) : query.OrderBy(a => a.TicketId); switch (recordLimit) { case 0: break; default: query = query.Take(count: recordLimit); break; } return(query.ToList()); }
public List <RolePermission> GetOrderedRecords(int recordLimit, bool orderByRolePermission = true) { var query = RepositoryDbSet.AsQueryable(); query = orderByRolePermission ? query.OrderBy(a => a.RolePermissionId) : query.OrderBy(a => a.UserRole); switch (recordLimit) { case 0: break; default: query = query.Take(count: recordLimit); break; } return(query.ToList()); }
public List <Reply> GetOrderedRecords(int recordLimit, bool orderByReplyDtime = true) { var query = RepositoryDbSet.AsQueryable(); query = orderByReplyDtime ? query.OrderBy(a => a.ReplyDtime) : query.OrderBy(a => a.ReplyIdentifier); switch (recordLimit) { case 0: break; default: query = query.Take(count: recordLimit); break; } return(query.ToList()); }
public List <TicketHistory> GetOrderedRecords(int recordLimit, bool orderByTicketStatusCode = true) { var query = RepositoryDbSet.AsQueryable(); query = orderByTicketStatusCode ? query.OrderBy(a => a.TicketStatusCode) : query.OrderBy(a => a.TicketHisDtime); switch (recordLimit) { case 0: break; default: query = query.Take(count: recordLimit); break; } return(query.ToList()); }
public override IEnumerable <Promotion> All() { return(RepositoryDbSet.AsQueryable() .ToList()); }
public int GetUserRestaurantCount(string userId) { return(RepositoryDbSet.AsQueryable().Count(r => r.UserId == userId)); }
public IEnumerable <RestaurantUser> FindAllByUserId(string userId) { return(RepositoryDbSet.AsQueryable().ToList().Where(r => r.UserId == userId)); }
public IEnumerable <RestaurantUser> FindAllByRestaurantId(int restaurantId) { return(RepositoryDbSet.AsQueryable().ToList().Where(r => r.RestaurantId == restaurantId)); }
public IEnumerable <RestaurantUser> FindAll(params object[] restaurantId) { return(RepositoryDbSet.AsQueryable().ToList().Where(r => r.RestaurantId == (int)restaurantId[0])); }
public IEnumerable <IdentityUserRole <string> > getUserRolesForUser(User user) { return(RepositoryDbSet.AsQueryable().ToList().Where(ur => ur.UserId == user.Id)); }
public override IEnumerable <RatingLog> All() { return(RepositoryDbSet.AsQueryable() .ToList()); }
public int GetUserMenuCount(string userId) { return(RepositoryDbSet.AsQueryable().Count(m => m.UserId == userId)); }
public override IEnumerable <Ingredient> All() { return(RepositoryDbSet.AsQueryable() .ToList()); }
public override IEnumerable <Person> All() { return(RepositoryDbSet.AsQueryable() .Include(x => x.Cars).ToList()); }