public async Task <HttpResponseMessage> AddNewCustomer([FromBody] M_Customer customer) { try { M_Customer cust = new OnlineShop.Model.M_Customer(); await Task.Run(() => { cust = icustomer.AddNewCustomer(customer); }); return(Request.CreateResponse(HttpStatusCode.OK, cust)); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message)); } }