コード例 #1
0
        public async Task <IHttpActionResult> SaveContact([FromBody] Contact contact)
        {
            try
            {
                //save contact from http request body
                ContactLogic contactLogic = new ContactLogic();
                var          email        = await contactLogic.SaveContacts(contact);

                return(Ok(email));
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }