コード例 #1
0
        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));
        }
コード例 #2
0
        public IEnumerable <UserGetModel> GetUsers()
        {
            var result = _dbContext.Users.ToList();

            return(result.Select(u => UserGetModel.GetUserModel(u, _dbContext)));
        }