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))); } }
//[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)); }