Tag Archives: entityframework

Home / entityframework
30 Posts

One deficiency with Entity Framework is the ability to load data from a stored procedure or a direct query when the column names don’t match your model property names exactly. In one of my previous posts, I detailed how the EF API can be used to retrieve column mappings. These column mappings can be used in conjunction with a SqlDataReader to map a query result, properly, to your EF model.

More Link

In a previous post, I demoed how to use Table Valued Parameters (TVP’s) with EF. This works great, but, if you’ll notice, it only suppports one-column TVP’s with a simple scalar list of values. I expanded this a bit.

More Link

There are a few limitations of Entity Framework 6.x that require various work-arounds. One of those limitations is not being able to take direct advantage of entity mappings that are defined. However, it is possible to utilize Entity Framework’s API’s to retrieve and consume this information.

More Link

Continuing our examination of building LINQ expressions, let’s dive further into generic methods that can build expressions for any enumerable list of objects. In part one, I showed how to build a simple string expression, but we can make this much more robust.

More Link

Using LINQ’s FluentAPI, left/outer joins are difficult. With a little work, it’s possible to perform left outer joins, though.

More Link

There are a few scenarios, especially when using partitioning/windowing T-SQL functions, that EF falls down a bit. It also is not entirely straight forward to perform somewhat complex joins and aggregation.

More Link

EntityFramework 7 is the defacto ORM used with .NET Core to provide cross-platform compatible data access. EF7 is missing many features that are present in EF6, though. My initial apprehension was that this would create a scenario where one could not use .NET Core if their projects relied on EF6 features. Fortunately, it’s pretty easy to get EF6 working with .NET Core. The sacrifice is a loss of cross-platform hosting ability.

More Link

Since my foray into utilizing .NET Core to port an older CRUD app using Angular 1.x and Entity Framework 6.x, my first stumbling block is dealing with breaking changes between EF 6.x and newer versions of EF.

More Link

I’ve written a number of posts detailing running and working with stored procedures in Entity Framework 6.x. Yesterday, I ran into a weird issue.

More Link

Over the weekend, I needed to be able to execute a stored procedure from EntityFramework that had a table value parameter (TVP) as an input.

I had never worked with TVP’s before. Utilizing them was not obvious to me from either a code-based approach or even directly with T-SQL. Here’s how I accomplished it, though.

More Link