Пример #1
0
        public async Task <IHttpActionResult> CreateScheme([FromBody] UserScheme userScheme)
        {
            HttpResponseMessage response = new HttpResponseMessage();

            try
            {
                var retvalue = await Task.Run(() => _schemeService.CreateScheme(userScheme));

                return(Ok(retvalue));
            }
            catch (Exception ex)
            {
                response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
                return(ResponseMessage(response));
            }
            finally
            {
            }
        }