コード例 #1
0
ファイル: CartService.cs プロジェクト: zykour/TheAfterParty
        public async Task <List <string> > GetOrderValidationErrors()
        {
            AppUser user = await GetCurrentUser();

            List <string> errors = new List <string>();

            if (!user.AssertQuantityOfCart())
            {
                errors.Add("Items you have added to your cart exceed the quantity that is available.");
            }

            if (!user.AssertBalanceExceedsCost())
            {
                errors.Add("Your available balance is insufficient to make the current purchase.");
            }

            return(errors);
        }