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));
        }
Exemple #2
0
 public async Task <List <Brand> > GetListAsync()
 {
     return(await _brandDAL.GetListAsync());
 }