public IEnumerable <UserGetModel> FilterUsersByCountRes(int count) { var result = _dbContext.Users .Include(u => u.Reservations) .ToList(); return(result.Select(u => UserGetModel.GetUserModel(u, _dbContext)) .Where(u => u.CountReservations >= count)); }
public IEnumerable <UserGetModel> GetUsers() { var result = _dbContext.Users.ToList(); return(result.Select(u => UserGetModel.GetUserModel(u, _dbContext))); }