Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public IHttpActionResult GetAllRent()
        {
            RentService rentService  = CreateRentService();
            var         rentProperty = rentService.GetRent();

            return(Ok(rentProperty));
        }