Ejemplo n.º 1
0
        public IFoodChoice AddFoodChoice(IFoodChoice choice)
        {
            var db = new TooksCmsDAL();

            var f = db.FoodChoices.Add(FoodChoice.CreateFoodChoice(choice));

            db.SaveChanges();

            return(f);
        }
Ejemplo n.º 2
0
        public void Rsvp(IRsvp rsvp)
        {
            var db = new TooksCmsDAL();

            var f = db.FoodChoices.Add(FoodChoice.CreateFoodChoice(rsvp.FoodChoice));

            var g = db.Guest1.Single(_g => _g.GuestId == rsvp.GuestId);

            g.RSVP(rsvp);

            db.SaveChanges();
        }