public async Task <IActionResult> DeleteConfirmed(int id) { var location = await _context.GetLocation(id); _context.DeleteLocation(location); return(RedirectToAction(nameof(Index))); }
public bool Delete(ApiLocation apiLocation) { Location location = new Location { ID = apiLocation.ID, Name = apiLocation.Name, CustomerID = apiLocation.CustomerID }; return(locationManager.DeleteLocation(location)); }
public bool Delete(ApiLocation apiLocation) { //string id = User.Identity.Name; Location location = new Location { ID = apiLocation.ID, Name = apiLocation.Name, CustomerID = Helper.getCustID() }; return(locationManager.DeleteLocation(location)); }
// DELETE api/<controller>/5 public void Delete(string id) { _locationManager.DeleteLocation(id); }
public Task <Location> DeleteLocation(Guid id) { return(_locationManager.DeleteLocation(id)); }