public ActionResult Add(Advert a)
 {
     ViewData["Brand"] = new SelectList(_brandLogic.GetAllBrands(true));
     if (!ModelState.IsValid) return View();
     _advertiselogic.AddAdvert(a); //TODO fazer verificações
     _userLogic.AssociateAdvertToUser(a.Id, User.Identity.Name);
     return RedirectToAction("Detailed", new { id = a.Id });
 }
 public bool DeleteAdvert(Advert advert)
 {
     return _dataAccess.Delete(advert);
 }
 public bool AddAdvert(Advert ad)
 {
     return _dataAccess.Add(ad);
 }
 public bool UpdateAdvert(Advert advert)
 {
     return _dataAccess.Update(advert);
 }