public async Task <ActionResult> Post([FromBody] Availablehotels hotel) { try { _log4net.Info("Adding hotel with id" + hotel.Id); return(Ok(await repository.AddHotel(hotel))); } catch { _log4net.Error("Error in adding hotel with id " + hotel.Id); return(new NotFoundObjectResult("Not updated")); } }