In response to Slauma's answer to my question about running applications that use EF on Windows XP I am converting my application back from Entity Framework 5.0 to use Entity Framework 5.0 and target framework .NET 4.0 (Also called Entity Framework 4.4)
However I encounter the following error;
System.Data.Entity.DbSet<MyEntity> does not contain a definition for AddOrUpdate
and no extension method of a type System.Data.Entity.DbSet<MyEntity> accepting a
first argument of type System.Data.Entity.DbSet<MyEntity> could be found.
(Are you missing a using directive or assembly reference )
I have tried searching on fragments of this error message, but am not having much success. Strangely 4.4 isn't even mentioned in this Microsoft link There isn't even an SO tag for EF4.4
You must add...
using System.Data.Entity.Migrations;
...to your code file to have AddOrUpdate
available. It is an extension method of IDbSet<T>
that is implemented in the IDbSetExtensions
class in System.Data.Entity.Migrations
namespace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With