public async Task <ActionResult <RentModel> > Get(string model) { try { var result = await _repository.GetRentAsync(model); if (result == null) { return(NotFound()); } return(_mapper.Map <RentModel>(result)); } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Fail")); } }