public override void Delete(int?id) { if (_repositoryAddress.Get(id) == null) { throw new ApplicationException("Address not found."); } _repositoryAddress.Delete(id); }
/// <summary> /// /// </summary> /// <param name="request"></param> /// <param name="context"></param> /// <returns></returns> public override Task <Empty> Delete(Request request, ServerCallContext context) { if (_repositoryAddress.Get(request.Id) == null) { throw new ApplicationException("Address not found."); } _repositoryAddress.Delete(request.Id); return(Task.FromResult(new Empty())); }
public ActionResult Delete(Guid AdressId) { Repository.Delete(AdressId); return(RedirectToAction("Index")); }