Пример #1
0
        // Đếm số lượng Room
        public int Count(UserEntity UserEntity, SearchRoomEntity SearchRoomEntity)
        {
            if (SearchRoomEntity == null)
            {
                SearchRoomEntity = new SearchRoomEntity();
            }
            IQueryable <Room> Rooms = CinemasEntities.Rooms;

            Rooms = SearchRoomEntity.ApplyTo(Rooms);
            return(Rooms.Count());
        }
Пример #2
0
        // Lọc thông tin Room dựa vào điều kiện search
        public List <RoomEntity> Gets(UserEntity UserEntity, SearchRoomEntity SearchRoomEntity)
        {
            if (SearchRoomEntity == null)
            {
                SearchRoomEntity = new SearchRoomEntity();
            }
            IQueryable <Room> Rooms = CinemasEntities.Rooms;

            Rooms = SearchRoomEntity.ApplyTo(Rooms);
            Rooms = SearchRoomEntity.SkipAndTake(Rooms);
            return(Rooms.ToList().Select(c => new RoomEntity(c)).ToList());
        }
Пример #3
0
 public List <RoomEntity> Gets([FromUri] SearchRoomEntity SearchRoomEntity)
 {
     return(RoomService.Gets(UserEntity, SearchRoomEntity));
 }
Пример #4
0
 public int Count([FromUri] SearchRoomEntity SearchRoomEntity)
 {
     return(RoomService.Count(UserEntity, SearchRoomEntity));
 }