public IHttpActionResult AddMember(MembersDTO membersDTO)//[FromBody]Members NewMember { Members members = membersDTO.ConvertToMembers(); DB.Members.Add(members); DB.SaveChanges(); return(Ok(DB.Members)); }
public IHttpActionResult EditMember(MembersDTO NewMember) { Members m = NewMember.ConvertToMembers(); Members m2 = DB.Members.Where(x => x.Id == m.Id).First(); m2.FreeTime = m.FreeTime; DB.SaveChanges(); return(Ok(DB.Members)); }