public IHttpActionResult PostContact(ContactAppService.Contact Contact) { if (!ModelState.IsValid) { return(BadRequest("Invalid Contact data")); } if (objContact.Insert(Contact).ID > 0) { return(Ok()); } else { return(BadRequest("Bad request")); } }
public IHttpActionResult Put(ContactAppService.Contact contact) { objContact.Update(contact); return(Ok()); }