Exemple #1
0
        // POST: api/Lookup
        public HttpResponseMessage Post([FromBody] AddressModel address)
        {
            int addressId = _addressServices.Create(address);

            return(addressId > 0
                ? Request.CreateResponse(HttpStatusCode.OK, addressId)
                : Request.CreateResponse(HttpStatusCode.Conflict, "Address exists."));
        }
Exemple #2
0
 [HttpPost]//Address
 public void Post([FromBody] Address value)
 {
     _addressServices.Create(value);
 }