// //Get:/Parties/Details public ActionResult Details(int id) { Party party = partyRepository.GetParty(id); if (party == null) { return(View("NotFound")); } else { return(View(party)); } }
public PartyModel GetParty(int id) { PartyModel party = new PartyModel(); PartyRepository repo = new PartyRepository(); if (party != null) { party = ParserParty(repo.GetParty(id)); } return(party); }
public ActionResult Register(int id) { Party party = partyRepository.GetParty(id); if (!party.IsUserRegistered(User.Identity.Name)) { Reservation res = new Reservation(); res.Attender = User.Identity.Name; party.Reservations.Add(res); partyRepository.Save(); } return(Content("Thanks!")); }
public PartyTable GetPartyById(long partyId) => _pr.GetParty(partyId);