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

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