public SingleQuery SingleById(int id, int idSubSubCategoria) { SubSubCategoriaIndOutput subsubcategoria = new SubSubCategoriaIndOutput(); subsubcategoria = _repository.ExecuteProcedureSingle <SubSubCategoriaIndOutput>(Consultas.DboSubSubCategoriaInd, id); if (subsubcategoria == null) { subsubcategoria = new SubSubCategoriaIndOutput { apiMensaje = string.Format(Mensaje.NoExiste, Mensaje.SubSubCategoria), apiEstado = Status.Error }; } else { } return(subsubcategoria); }
public IActionResult Get(int id) { try { SubSubCategoriaIndOutput data = (SubSubCategoriaIndOutput)_manager.SingleById(id, 0); if (data.apiEstado.Equals(Status.Error)) { return(NotFound(data)); } return(Ok(data)); } catch (Exception ex) { _logger.LogError(LoggingEvents.SERVICE_ERROR, ex, ex.Message); return(new EmptyResult()); } }