public async Task <Prestation> GetPrestationById(int id) { try { var spec = new PrestationsWithCategoriesSpecification(id); return(await _unitOfWork.Prestations.GetEntityWithSpec(spec)); } catch (Exception) { throw; } }
public async Task <IEnumerable <Prestation> > GetAllPrestations(PrestationSpecParams specParam) { var spec = new PrestationsWithCategoriesSpecification(specParam); return(await _unitOfWork.Prestations.ListAsync(spec)); }