Browse by Tags

All Tags » Entity Framework (RSS)

EntityDataSource control for Entity Framework 6 Preview by Ken Cox [MVP]

It took a while but we now have a preview version of the EntityDataSource control for Entity Framework 6. This will really help those of us who want to move ASP.NET 3.5 sites to a later version of the framework without going back over those legacy (but...

Explained: EF 6 and “Could not determine storage version; a valid storage connection or a version hint is required.” by Ken Cox [MVP]

I have a legacy ASP.NET 3.5 web site that I’ve upgraded to a .NET 4 web application. At the same time, I upgraded to Entity Framework 6. Suddenly one of the pages returned the following error: [ArgumentException: Could not determine storage version; a...

Fix: The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced. by Ken Cox [MVP]

I got this message in a class that inherits from  DbContext.  It made no sense, because System.Data.Entity was definitely referenced in my ASP.NET project. The fix was to select the reference in the properties page and change Copy Local to True...

Entity Framework Code First–Magic SQL Tool by Ken Cox [MVP]

Having written the plain old  classes (POCO) for my latest Web application, I wasn’t looking forward to creating the corresponding tables in SQL Server. I’m not a database guy really. Just a guy who needs to use databases.   Faced with a lot...

Fix: 'Unable to load one or more of the requested types' Errors by Ken Cox [MVP]

A long time ago, I reported on an intermittent ‘Could not load file or assembly‘ bug where ASP.NET 4 was encountering a bizarre error on start-up in System.Reflection.RuntimeModule.GetTypes(RuntimeModule module). I neglected to post a follow-up here....

Extracting the Date from a DateTime in Entity Framework 4 and LINQ by Ken Cox [MVP]

In my current ASP.NET 4 project, I’m displaying dates in a GridDateTimeColumn of Telerik’s ASP.NET Radgrid control. I don’t care about the time stuff, so my DataFormatString shows only the date bits: <telerik:GridDateTimeColumn FilterControlWidth=...

Entity Framework Code-First to Provide Replacement for ASP.NET Profile Provider by Ken Cox [MVP]

A while back, I coordinated a project to add support for the SQL Table Profile Provider in ASP.NET 4 Web Applications.  We urged Microsoft to improve ASP.NET’s built-in Profile support so our workaround wouldn’t be necessary. Instead, Microsoft plans...

Fix: The version of SQL Server in use does not support datatype 'datetime2'. by Ken Cox [MVP]

This message appeared today after posting a new build to our ASP.NET 4 web app: The version of SQL Server in use does not support datatype 'datetime2'. The DBA doesn’t use datetime2 because it’s new in SQL Server 2008 and the site runs on 2005. ...

Fix: The argument types 'Edm.Guid' and 'Edm.String' are incompatible for this operation. by Ken Cox [MVP]

This one had me going for a while until I found the tip in Julie Lerman’s essential book,  Programming Entity Framework, 2nd Edition . In my ASP.NET 4 project, I create an Entity SQL query to look up a GUID. I cast the GUID as a string and wrap it...

Fed Up With System.Data.Metadata.Edm.ObjectItemAssemblyLoader by Ken Cox [MVP]

I’m fed up with the random errors I’m getting on my ASP.NET 4, Entity Framework 4 web application lately. It seems to stem from something that System.Data.Metadata.Edm is doing with a call to System.Reflection.Assembly.GetTypes(). I keep getting the error...
More Posts Next page »