Пример #1
0
        private async Task <CollectCompanyDetailsViewModel> FillCollectCompanyDetails()
        {
            var brandsEnumerable = await brandService.AllAsync();

            var employersEnumerable = await employeerService.AllAsync();

            var branchesEnumerable = await branchService.AllAsync();

            var newVehicle = new CollectCompanyDetailsViewModel()
            {
                Branches = branchesEnumerable
                           .ToSelectListItems(b => b.FullAddress, b => b.Id.ToString()),
                Employers = employersEnumerable
                            .ToSelectListItems(b => b.Name, b => b.Id.ToString()),
                Brands = brandsEnumerable
                         .ToSelectListItems(b => b.Name, b => b.Id.ToString())
            };

            return(newVehicle);
        }