Ejemplo n.º 1
0
 public ActionResult <Todo> Post(TodoUI todoUI)
 {
     if (todoUI.Title != null && todoUI.Title != "")
     {
         Todo todo = todosService.Init(todoUI.Title);
         todosService.Save(todo);
         return(Ok(new { todo }));
     }
     return(BadRequest(new { message = "title is null or empty" }));
 }