First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

Entity Framework

There are 4 entries for the tag Entity Framework

Entity Framework 4.3.1 Migrations and non English locale

A few days ago I started migrating a web app I was working on from ASP.NET MVC 3 and EF4 to ASP.NET MVC 4 and EF 4.3.1. All went well, except for some problems with the automatic generation of the DB scheme using EF Code First: it was creating the database, but no tables and not even the __MigrationHistory table added in 4.3; and during the execution of the schema generation an error was raised with a weird datetime conversion error. I tried this both on SQL Express 2005 and SQL Compact and I got the same outcome, just different...

Logging all SQL statements done by Entity Framework

One of the disadvantages of using an ORM is that your application doesn’t know which SQL commands are being executed. In this post I’m going to show you how to log all the SQL statements that are executed by Entity Framework. This is very useful if you want to look at the query executed and the time take by each to catch some possible pitfalls, or to keep a log of all the commands executed if you have your own custom replication/synchronization strategy. The need I was exactly in that latter scenario: the backend acts on one DB,...

Only parameterless constructors and initializers are supported in LINQ to Entities

Back from the holiday an nice surprise was awaiting for me: I’ve to “finalize” (as in make it work) an application that someone that left the company developed more than one year ago. Among the other problems one real surprised me: the project is built with .NET 3.5 and uses Entity Framework v1 and in some the queries failed with the following strange error: Only parameterless constructors and initializers are supported in LINQ to Entities. Just to be clear, it was a runtime error, not a build failure. The queries that were failing...

How to install ASP.NET 3.5 Extensions Preview

If you are like me, and don't read the instructions and the readme files, you might encounter a few problems in getting the ADO.NET designer to work. To enable the ADO.NET designer you need to install the ADO.NET EF Tools. But in order to install it correctly you have to install also the ADO.NET EF beta 3 and a cryptic XML Editor QFE in the right order. So the correct installation order is: Visual Studio 2008 XML Editor QFE ADO.NET EF Beta 3 ADO.NET EF Tools (Dec...