Ejemplo n.º 1
0
        private DeliveryDriverService CreateDeliveryDriverService()
        {
            // var userId = Guid.Parse(User.Identity.GetUserId());
            var service = new DeliveryDriverService();

            return(service);
        }
Ejemplo n.º 2
0
        public async Task <IEnumerable <SelectListItem> > GetDeliveryDriversAsync()
        {
            // var userId = Guid.Parse(User.Identity.GetUserId());
            var catService   = new DeliveryDriverService();
            var categoryList = await catService.GetDeliveryDriversAsync();

            var catSelectList = categoryList.Select(
                e =>
                new SelectListItem
            {
                Value = e.DriverId.ToString(),
                Text  = e.FirstName
            }
                ).ToList();

            return(catSelectList);
        }