Example #1
0
 public JsonResult CreateNote(Note model)
 {
     if (ModelState.IsValid)
     {
         _noteFactory.Add(model);
         Note NewNote = _noteFactory.GetLatest();
         return(Json(NewNote));
     }
     return(Json(new { Failed = "true" }));
 }