public IHttpActionResult PutMember(int id, Member member)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != member.ID)
            {
                return(BadRequest());
            }

            db.Entry(member).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MemberExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Esempio n. 2
0
 public void UpdateWebsite(Website w)
 {
     context.Entry(w).State = EntityState.Modified;
 }
Esempio n. 3
0
 public void UpdateMemberWebsiteRelation(MemberWebsiteRelation m)
 {
     context.Entry(m).State = EntityState.Modified;
 }
Esempio n. 4
0
 public void UpdateMember(Member m)
 {
     context.Entry(m).State = EntityState.Modified;
 }
 public void UpdateVisit(Visit w)
 {
     context.Entry(w).State = EntityState.Modified;
 }