public ActionResult AddAdvertisement(AdvertisementViewModel advertisementViewModel) { Advertisement add = new Advertisement(); add.ImagePath = advertisementViewModel.ImagePath; add.Owner = advertisementViewModel.Owner; _AdvertisementRepo.Insert(add); return(RedirectToAction("Advertisement")); }