EF Core

Entity Framework Core: Configure Database Connection using Azure Service Token Provider

Update - READ THIS FIRST There is now support to connect to any Azure SQL database, Azure SQL Managed Instance and Synapse SQL in Azure Synapse Analytics from your .NET Core app using just the connection string. To learn more about this read the following pages: Use Azure Active Directory Authentication with your Azure DB Using Azure Active Directory auth with SqlClient This will completely eliminate the need to write any code to obtain a service connection in your application....

June 26, 2021 · 11 min · 2319 words
EF Core

Entity Framework Core 3.1 - Part 4

In my previous post, we talked about interacting with related entities using entity framework. Introduction Time to look at some special cases where you would want entity framework to work with views, stored procedures and plain old SQL statements. There is a wide minconception that developers raise, “Oh it is a stored procedure, that can’t be good”. There is nothing inherently wrong with using stored procedures. It is nice to have all business logic in one place....

October 25, 2020 · 9 min · 1729 words · eakangk
EF Core

Entity Framework Core 3.1 - Part 3

In my previous post, we talked about data access and updates in entity framework. Updating Related Data A naive way to update related data, especially when the context isn’t tracking your object, as in, you send data about an existing entity in the database, from the UI, and EF has to figure out what part of the updated record has changed and needs an update in the database. If you ever encounter a situation where you are to update only one related object of a primary entity, then you might be in for a surprise....

October 25, 2020 · 7 min · 1464 words · eakangk
EF Core

Entity Framework Core 3.1 - Part 2

In my previous post, we talked looked at an introduction into entity framework core 3. Read and Write Data As I mentioned in the earlier one, I don’t really like writing posts that take longer than 10 minutes to read. It is just too much information. So let us continue with the next part. To learn more about entity framework mappings always refer to this amazing course on Pluralsight titled: Entity Framework Core 2: Mappings, by Julie Lerman...

October 25, 2020 · 9 min · 1825 words · eakangk
EF Core

Entity Framework Core 3.1 - Part 1

What is this about? This post is one of many in a series of posts on Entity Framework Core. I have attempted to summarise what I learned while working with Entity Framework Core, from stackoverflow answers, to entity framework official docs to courses on pluralsight. In this journey, I found, the pluralsight course, Entity Framework Core: Getting Started by @julielerman most useful. As someone who spent the past few years primarily on managing people, I missed out a lot on the tech side of things....

October 25, 2020 · 9 min · 1836 words · eakangk
*/}}