Series : 2 Integrate Firebase in .NET

Solgamahardik
2 min readFeb 21, 2022

--

First of all you have to do is to create account in firebase. Here I attached a link that will help you to create project in firebase console app.

These are some steps listed below that take you to exact place of firebase integration with .NET.

Firstly, you need to create a .net project and then install NuGet package, and name of the package is FireSharp and version of package is 2.0.4.

Now you will need credentials to perform CRUD operation.

  1. To connect with your real time database, copy base path from the console app.

2. Then we need authsecret key, that key you can fetch from :

project setting > service account > database secret key.

3. Lastly, let’s write code in .NET.

IFirebaseConfig ifc = new FirebaseConfig()
{
AuthSecret = “**********x8Ed6HVU0YXlXW-L75ho4ps”,
BasePath = “https://we****.firebaseio.com/”
};
IFirebaseClient client;

User user = new User(){ Id: 1, FirstName : “Test 1”, LastName : “Test 2” };

client = new FireSharp.FirebaseClient(ifc);

// Insert data
var set = client.Set(@”User/” + user.Id, user);

// Delete data
var set = client.Delete(@”User/” + user.Id);

//Update data
var set = client.Update(@”User/” + user.Id, user);

//List the data
var set = client.Get(@”User/” + user.Id);

Explore more from here, please click here

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Solgamahardik
Solgamahardik

Written by Solgamahardik

👨‍💻 .NET developer with 7 years of experience, I thrive on crafting robust and efficient solutions that bridge the gap between ideas and implementation.

Responses (1)

Write a response