Exemple #1
0
        public IHttpActionResult Get()
        {
            PartyItemService partyItemService = CreatePartyItemService();
            var partyItems = partyItemService.GetPartyItems();

            return(Ok(partyItems));
        }
Exemple #2
0
        private PartyItemService CreatePartyItemService()
        {
            var userId           = Guid.Parse(User.Identity.GetUserId());
            var partyItemService = new PartyItemService(userId);

            return(partyItemService);
        }
Exemple #3
0
 public ActionResult Edit(PartyItemEdit partyItem)
 {
     if (ModelState.IsValid)
     {
         _userId           = Guid.Parse(User.Identity.GetUserId());
         _partyItemService = new PartyItemService(_userId);
         _partyItemService.EditPartyItem(partyItem);
         return(RedirectToAction("Index"));
     }
     return(View(partyItem));
 }