예제 #1
0
 public ActionResult Post(NewProjectModel project)
 {
     if (ModelState.IsValid)
     {
         var temp = new Project {
             Name = project.Name
         };
         _dao.Add(temp);
         _dao.Save();
         return(Ok(new ProjectResponse(temp, $"Project {project.Name} created!")));
     }
     return(ValidationProblem());
 }