Пример #1
0
 public void EliminarPersona(persona p) //Para comunicar con el
 {
     if (p != null)
     {
         if (Confirmar?.Invoke(p.nombre) == true)
         {
             PersonasRepository per = new PersonasRepository();
             per.Delete(p);
             Cargar();
         }
     }
 }
 public void ELiminarPersona(Personas p)
 {
     if (p != null)
     {
         if (Confirmar?.Invoke(p.Nombre) == true)
         {
             PersonasRepository persona = new PersonasRepository();
             persona.Delete(p);
             Cargar();
         }
     }
 }
Пример #3
0
        public async Task <IHttpActionResult> Delete(string Id)
        {
            try
            {
                log.Info(new MDCSet(this.ControllerContext.RouteData), new InfoException(Id));
                await _repository.Delete(Id);

                return(Ok("Registro eliminado correctamente!"));
            }
            catch (Exception e)
            {
                log.Error(new MDCSet(this.ControllerContext.RouteData), e);
                throw new Exception(e.Message, e);
            }
        }