C# Dapper - How to execute a select statement using a list of Ids with an IN clause in MSSQL
Using Dapper you can easily map results of a query to an object or a list of objects. Sometimes you want to select a list of »
Using Dapper you can easily map results of a query to an object or a list of objects. Sometimes you want to select a list of »
Dapper makes it easy to "Execute a query and map the results - if any - to a strongly typed List". This post demonstrates »
This post describes two ways to get the generated identity of a newly inserted row. We will use the following table simple table with an Id »
You can use the SqlConnection class to connect to a MSSQL server. If we have a database called MyDb with a simple table called MyEntities: CREATE »
I am not sure that the correct term is "static" data - it seems to be known as seeding, which is the term I »
It seems that every guide I find on Entity framework, the database connectionString is fetched from the config file magically. I wanted to inject it instead »
Today I was trying to make an initial migration using Entity framework. I encountered an error when calling dotnet ef migrations add InitialCreate: C:\Users\peter\ »
I have witnessed this error quite a few times in my career. I see it every time there is something wrong with the network in a »
In this post I show how to select and cast values from a column containing JSON so that you can work with the fields as you »
It is quite easy to give SQL a hint on which index to use for a query, but we should start with a warning: this is »