コード例 #1
0
 private void AddTaskToFirebase(ToDo task)
 {
     //client = new FireSharp.FirebaseClient(config);
     //var data = task;
     //PushResponse response = client.Push("Tasks/", data);
     //data.task_id = response.Result.name;
     //SetResponse setResponse = client.Set("Tasks/" + data.task_id, data);
 }
コード例 #2
0
 public ActionResult Create(ToDo task)
 {
     try
     {
         AddTaskToFirebase(task);
         ModelState.AddModelError(string.Empty, "Added Successfully");
     }
     catch (Exception ex)
     {
         ModelState.AddModelError(string.Empty, ex.Message);
     }
     return(View());
 }