public ActionResult EditAdvertise(Advertise advertise)
 {
     if (ModelState.IsValid)
     {
         advertiseService.UpdateAdvertise(advertise);
         return(RedirectToAction("GetAllAdvertises"));
     }
     return(View(advertise));
 }
        public ActionResult EditAdvertise(Advertise advertise)
        {
            Log.Debug($"Updating {advertise.Title}");

            if (ModelState.IsValid)
            {
                try
                {
                    advertiseService.UpdateAdvertise(advertise);
                    return(RedirectToAction("Advertises"));
                }
                catch (Exception e)
                {
                    Log.Error(e.ToString());
                }
            }

            return(View(advertise));
        }