public Country DeleteCountry(int idToSearch) { Country found = null; using (PropertyHubContext context = new PropertyHubContext()) { found = context.Find <Country>(idToSearch); context.Remove(found); context.SaveChanges(); } return(found); }
public Province DeleteProvince(int idToSearch) { Province found = null; using (PropertyHubContext context = new PropertyHubContext()) { found = context.Find <Province>(idToSearch); context.Remove(found); context.SaveChanges(); } return(found); }