コード例 #1
0
        public async Task <ActionResult> EditRoomType(int projectId, int roomTypeId)
        {
            var entity = await _accommodationService.GetRoomTypeAsync(roomTypeId).ConfigureAwait(false);

            if (entity == null || entity.ProjectId != projectId)
            {
                return(Forbid());
            }

            return(View(new RoomTypeViewModel(entity, CurrentUserId)));
        }