public ActionResult AddRentalListing(RentListingModel model) { var user = User.Identity.Name; if (String.IsNullOrEmpty(user)) { return(Json(new { Success = false })); } var login = AccountService.GetLoginByEmail(user); if (ModelState.IsValid) { var files = Request.Files; var result = RentalService.AddRentalListing(model, files, login); return(Json(new { Success = result.IsSuccess })); } return(Json(new { Success = false })); }