WebLog Posts in Category Entity Framework


Entity Framework and slow bulk INSERTs
December 22, 2013 @ 10:30am

While inserting a large number of records into a SQL database using EF Code First, I ran into some stunningly slow performance. In this article I show the problem and a couple of simple workarounds to this issue.

11 comments
Firing an Entity Framework Database Initializer from within DbContext
March 26, 2013 @ 12:53pm

Database initializers in Entity Framework can be a pain, especially when you're using EF as part of smaller components that may or may not load into a database shared with other EF Contexts. Here's a small helper utility that lets you internalize the database initializer and fire it the first time the context is loaded.

5 comments
Sql Connection Strings in .Config Files vs. Source Control
February 27, 2013 @ 12:18pm

Connection strings in projects under source control can be problematic. Each Source Control user can potentially have different connection settings to use a database connection and these differences can't be easily reconciled via Source Control. Here are a couple of approaches that have worked for me to deal with this issue.

9 comments
Basic Spatial Data with SQL Server and Entity Framework 5.0
June 21, 2012 @ 7:10am

Spatial data has been available for a while in SQL Server, but if you wanted to use it with Entiry Framework you had to jump through some hoops. In this post I show how basic SQL Spatial data works and then how you can utilize the new features in EF 5.0 to directly access spatial data using your CodeFirst models.

9 comments


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2014