예제 #1
0
        public void Post([FromBody] Participants participants)
        {
            ParticipantsDbEntities entities = new ParticipantsDbEntities();

            entities.Participants.Add(participants);
            entities.SaveChanges();
        }
예제 #2
0
        public void Delete(string initials)
        {
            ParticipantsDbEntities entities = new ParticipantsDbEntities();
            //Participants participant = new Participants();
            var p = entities.Participants.Where(x => x.initials == initials).FirstOrDefault();

            entities.Participants.Remove(p);
            entities.SaveChanges();
        }