public async Task <List <SubCategoryDto> > GetSubCategories() { try { var data = await _subCategoriesRepository.GetAll(); return(_mapper.Map <List <SubCategoryDto> >(data)); } catch (Exception ex) { throw ex; } }
public IResult GetAll() => new ValidateResult(_subCategoriesRepository.GetAll(), true, "Consulta Realizada com sucesso");