public async Task <IDataResult <CreateProductElementsDto> > GetCreateProductElements() { CreateProductElementsDto createProductElements = new CreateProductElementsDto(); createProductElements.Brands = await _brandDAL.GetListAsync(); createProductElements.Categories = (await _categoryDAL.GetListAsync(null, x => x.ChildCategories)).Where(x => x.ChildCategories.Count == 0).ToList(); createProductElements.Colors = await _colorDAL.GetListAsync(); createProductElements.DemandTypes = await _demandTypeDAL.GetListAsync(); return(new SuccessDataResult <CreateProductElementsDto>(createProductElements)); }
public async Task <IDataResult <List <DemandType> > > GetListAsync() { var demandTypes = await _demandTypeDAL.GetListAsync(null, x => x.Demands); return(ResultHelper <List <DemandType> > .DataResultReturn(demandTypes)); }