Is there any way that the entity framework view generation can be done for code first/fluent mapping models?
I tried experimenting by having the view generated by the template in Entity Developer even though we use database independent fluent mapping (modified the conditional on the template). The result is a nice view, which EF doesn't like because of the hashing values.
I also tried template solutions and the EF Power Tools, both of these solutions suffer from a need to have a database to connect to and the resulting generated view is "database dependant" even though no code is actually different (i tried on an MSSQL and an Oracle database, the only differing values were the hashes).
If there isnt any way (hacky or otherwise) to do this today, is it even possible to implement it in a future version of Entity Developer or is it a design error from MS?
View Generation for Fluent Mapping/Code First
Re: View Generation for Fluent Mapping/Code First
Currently, pregenerating view is not created (and not supported) when the DbContext template is used and its Fluent Mapping property is set to True. We think that pregenerating view was generated in your case because Fluent Mapping was set to False. The pregenerating view support with Fluent Mapping=true is on our road map.esben wrote:I tried experimenting by having the view generated by the template in Entity Developer even though we use database independent fluent mapping (modified the conditional on the template).
Hashes are generated by Microsoft code so we cannot give you information how it is created. It is possible that the same view cannot be used with different databases.esben wrote:the resulting generated view is "database dependant" even though no code is actually different (i tried on an MSSQL and an Oracle database, the only differing values were the hashes)
Re: View Generation for Fluent Mapping/Code First
Fair enough, not much to do about it I guess. Would be nice to know if you somehow get more information on this.Shalex wrote: Currently, pregenerating view is not created (and not supported) when the DbContext template is used and its Fluent Mapping property is set to True. We think that pregenerating view was generated in your case because Fluent Mapping was set to False. The pregenerating view support with Fluent Mapping=true is on our road map.Nope the view was generated because i modified the template to do it, but that is irrelevant (was just for general information)
Shalex wrote: Hashes are generated by Microsoft code so we cannot give you information how it is created. It is possible that the same view cannot be used with different databases.
Re: View Generation for Fluent Mapping/Code First
We recommend you to refer this question to Microsoft:
http://connect.microsoft.com/
http://social.msdn.microsoft.com/
http://connect.microsoft.com/
http://social.msdn.microsoft.com/