Beispiel #1
0
        public ActionResult <Task <IEnumerable <Project> > > GetAllProjects()
        {
            Task <IEnumerable <Project> > data = system.GetAllProjects();

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