Any doc on using views and sprocs in the designer and model?
-
- Posts: 31
- Joined: Mon 04 May 2015 18:49
Any doc on using views and sprocs in the designer and model?
I'm hoping somewhere is documented designer support for using SQL Server views and sprocs in the model for Entity Framework 6 and maybe what happens for Code First output for these as well. Can't say I understand yet the EF CF restriction regarding Typed Views or if even referring to something different than normal SQL views. Thx
Re: Any doc on using views and sprocs in the designer and model?
Views
The information, whether it is a table or a view, is available in case of XML mapping. But Code-First Fluent Mapping considers all entities as tables (by Microsoft design) because there is no way to store information about a view in Fluent Mapping.
Stored procedures
Stored Procedure Mapping is currently not supported by a predefined DbContext template with FluentMapping=True (it works in case of FluentMapping=False). As a temporary workaround, you can implement stored procedure mapping in a partial (to avoid overwriting by the designer) class manually.
The information, whether it is a table or a view, is available in case of XML mapping. But Code-First Fluent Mapping considers all entities as tables (by Microsoft design) because there is no way to store information about a view in Fluent Mapping.
Stored procedures
Stored Procedure Mapping is currently not supported by a predefined DbContext template with FluentMapping=True (it works in case of FluentMapping=False). As a temporary workaround, you can implement stored procedure mapping in a partial (to avoid overwriting by the designer) class manually.
-
- Posts: 31
- Joined: Mon 04 May 2015 18:49
Re: Any doc on using views and sprocs in the designer and model?
Thanks for that information. I have managed to successfully convert my DF project to DevArt Entity Developer after a few bumps with enums and navigation properties.
I will experiment with CF going forward but am fine for now with the DF model.
I will experiment with CF going forward but am fine for now with the DF model.