WebLog Posts in Category Entity Framework
Firing an Entity Framework Database Initializer from within DbContext
March 26, 2013 @ 12:53 pm

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.

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

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:10 am

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.

6 comments


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