예제 #1
0
        //GET: /ConsumedBeers
        public ActionResult Drink(string id)
        {
            BeerConsumptionCreateView bcc = new BeerConsumptionCreateView();

            bcc.BeerId = id;

            return(View(bcc));
        }
예제 #2
0
        public async Task <ActionResult> Drink(BeerConsumptionCreateView bcc)
        {
            try
            {
                await ApiClient.PostAsync <BeerConsumptionCreateView>(bcc, "ConsumedBeers/");

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }