Exemplo n.º 1
0
 public ActionResult Add(Person newGuy)
 {
     try
     {
         newGuy.ID = Service.GetNextID();
         var model = Service.AddPerson(newGuy);
         string view = RenderViewToString("_thePeople", model);
         
         return new JsonResponseSuccess(view);
        
     }
     catch (Exception ex)
     {
         return new JsonResponseError(ex.Message);
     }
 }
Exemplo n.º 2
0
 internal static List<Person> AddPerson(Person newGuy)
 {
     var list = Service.GetPeople();
     list.Add(newGuy);
     return list;
 }