示例#1
0
        public IActionResult Pending()
        {
            List <PackageViewModel> packages = packagesService.GetByStatus(PackageStatus.Pending, User.Username)
                                               .Select(p => new PackageViewModel()
            {
                Id              = p.Id,
                Description     = p.Description,
                Weight          = p.Weight,
                RecipientName   = p.Recipient.Username,
                ShippingAddress = p.ShippingAddress
            })
                                               .ToList();

            return(View(packages));
        }