public async Task <IActionResult> Get(string uri)
 {
     try
     {
         short id = short.Parse(uri);
         return(Ok(await _roomTypeService.GetRoomType(id)));
     }
     catch (System.Exception)
     {
         return(Ok(await _roomTypeService.GetRoomType(uri)));
     }
 }
예제 #2
0
        //[HttpPost]
        public IActionResult Delete(int?Id)
        {
            if (Id == null)
            {
                return(NotFound());
            }
            var roomType = IRoomTypeService.GetRoomType((int)Id);

            if (roomType == null)
            {
                return(NotFound());
            }
            return(View(roomType));
        }