Beispiel #1
0
        public ResultEntity Delete(int id)
        {
            var result = new ResultEntity();

            var tn = _repository.GetByKey(id);

            var repResult = _repository.Delete(tn);

            result.ResultOk         = repResult.ActionResult;
            result.Message          = repResult.ActionResult ? "Torneo eliminado con exito." : $"Error al eliminar el Torneo ID: {tn.Id} - {tn.Nombre}.";
            result.ErrorCode        = repResult.ActionResult ? 200 : 500;
            result.ErrorDescription = repResult.Error?.Message;

            return(result);
        }
Beispiel #2
0
 public bool Delete(int id)
 {
     return(torneoRepository.Delete(id));
 }