public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var rent = service.GetRent(id); if (rent == null) { return(HttpNotFound()); } return(View(rent)); }
public IHttpActionResult GetAllRent() { RentService rentService = CreateRentService(); var rentProperty = rentService.GetRent(); return(Ok(rentProperty)); }