public async Task <AddHotelResponse> AddHotelsAsync(AddHotelRequest request) { var response = new AddHotelResponse(); HotelsEntity entity = new HotelsEntity() { Name = request.Name, StartDate = request.StartDate, EndDate = request.EndDate, Price = request.Price, Count = request.Count }; bool status = await _hotelRepository.AddHotelsAsync(entity); if (status) { response.StatusCode = (int)HttpStatusCode.Created; } else { response.StatusCode = (int)HttpStatusCode.BadRequest; } return(response); }