Check out example codes for "CRUD configuration MVC with Firebase". It will help you in understanding the concepts better.

Code Example 1

    ViewBag.Title = "About";

<h3>Login History</h3>
<p>Current user: @ViewBag.CurrentUser</p>
    @foreach(var timestamp in ViewBag.Logins)
        <li>Login at @timestamp</li>

Code Example 2

public async Task<ActionResult> About()
  //Simulate test user data and login timestamp
  var userId = "12345";
  var currentLoginTime = DateTime.UtcNow.ToString("MM/dd/yyyy HH:mm:ss");

  //Save non identifying data to Firebase
  var currentUserLogin = new LoginData() { TimestampUtc = currentLoginTime };
  var firebaseClient = new FirebaseClient("yourFirebaseProjectUrl");
  var result = await firebaseClient
    .Child("Users/" + userId + "/Logins")

  //Retrieve data from Firebase
  var dbLogins = await firebaseClient

  var timestampList = new List<DateTime>();

  //Convert JSON data to original datatype
  foreach (var login in dbLogins)

  //Pass data to the view
  ViewBag.CurrentUser = userId;
  ViewBag.Logins = timestampList.OrderByDescending(x => x);
  return View();

Code Example 3

public string TimestampUtc { get; set; }

Learn ReactJs, React Native from