Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: EF6 Views compatibility

$
0
0

Hi Max,

Yes. It is possible to use EF6 views in EF5 apps after some modifications. I just tried - here is what you would have to do:

Change namespace for EntityViewGenerationAttribute from:
System.Data.Entity.Core.Mapping toSystem.Data.Mapping

Replace the EF6 HashOverMappingClosure with the value from the EF5 pregenerated views.

The two above steps were enough to make EF6 views work on a EF5 app - it was very simple in my case - just one entity but I think it should work in general case as well.

Thanks,

Pawel

 


Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>