コード例 #1
0
        public ActionResult <Project> AddProject([FromBody] Project value)
        {
            Task <Project> data = system.AddProject(value);

            if (data.IsCanceled)
            {
                return(BadRequest(data.Exception));
            }
            else if (data.Result == null)
            {
                return(NoContent());
            }
            else
            {
                return(Ok(data.Result));
            }
        }