//[HttpPost] //public ActionResult FileUpload(AddImagesModel model) //{ // string text = ""; // if (model.file != null) // { // string path = System.IO.Path.Combine( // Server.MapPath("~/Images"), ""); // ObjectFactory factory = new ObjectFactory(repository); // IAddImage addImage = factory.CreateObject(model.type.ToString()); // text = addImage.AddPathToEntity(model.Id, path); // if (text == "") // { // return View("AddImagesToMany"); // } // model.file.SaveAs(path + text); // } // if (text.Contains("Hotel")) // { // return RedirectToAction("EditHotel", new { id = text[6] }); // } // else // { // return RedirectToAction("EditResort", new { id = text[7] }); // } //} // GET: Owner public ActionResult Index() { HolidayViewModel model = new HolidayViewModel(); model = repository.GetModelByUser(User.Identity.GetUserId()); return(View(model)); }