public override void Delete(int?id)
        {
            if (_repositoryAddress.Get(id) == null)
            {
                throw new ApplicationException("Address not found.");
            }

            _repositoryAddress.Delete(id);
        }
Exemple #2
0
        /// <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()));
        }
Exemple #3
0
 public ActionResult Delete(Guid AdressId)
 {
     Repository.Delete(AdressId);
     return(RedirectToAction("Index"));
 }