public bool remove(int id) { var advertisement = AdvertisementRepository.find(id); if (advertisement.Status == "Inactive") { return(false); } AdvertisementRepository.remove(id); return(true); }
public bool update(int id, string title, string description) { var advertisement = AdvertisementRepository.find(id); if (advertisement.Status == "Inactive") { return(false); } AdvertisementRepository.update(id, title, description); return(true); }