Disclaimer: This blog post was written by a protein-based intelligence. in a previous blog post , I showed you how to use PostgreSQL in C# with Npgsql, Dapper, and Entity Framework Core. But if you’re going to use one of them, it’s probably a good idea to make sure you’re not choosing a library that has really bad performance. Or at least to understand how much it’s going to hurt.
One of the most used databases these days is PostgreSQL (aka Postgres). Its accomplishments include being the most popular DB [among professional developers] according to Stack Overflow survey of 2022 , the database in all of the fastest TechEmpower benchmarks , and being the most advanced open source database (self-proclaimed). We’ll talk today about combining Postgres with my favorite language and runtime: C# and .NET. Just because Postgres isn’t a first-party Microsoft database, like SQL Server, doesn’t mean you don’t have full support for it in C#.
We continue on our path to make a web application using C# and .NET. After choosing the front-end technology in part 1 , picking the backend server tech in part 2 , and deploying to Azure in part 3 , we’re going to concentrate on choosing the database. With emphasis on .NET and Azure technologies of course. A database, or rather databases, is one of the most important aspects of any big application.
Oren certainly makes a unique impression. Having listened to a lot of CEO interviews in countless podcast episodes, I never encountered another CEO more knowledgeable about the intricacies of C# than Oren. As we sidetracked into his many adventures in developing a database, Oren’s talked about .NET garbage collection, ...
In this article, you'll see how frameworks like Entity Framework and MongoDB C# driver use expressions trees to make that conversion. And you'll see how to use expression trees yourself to build dynamic queries. Those are queries that you aren't able to create at compile time because you'll know how the query should look like only at runtime.