// Function To Create Event
        public Boolean addEvents(Event ev)
        {
            if (ev == null)
            {
                return(false);
            }

            if (ev.EventDate == null || ev.EventDescription == null || ev.EventLocation == null ||
                ev.EventName == null || ev.EventOtherDetails == null || ev.EventStartTime == null)
            {
                return(false);
            }

            db.events.Add(ev);
            db.SaveChanges();
            // ModelState.Clear();
            return(true);
        }
Пример #2
0
 public bool addInvitation(Invitation invitation)
 {
     db.invitation.Add(invitation);
     db.SaveChanges();
     return(true);
 }