Page 1 of 1

Any doc on using views and sprocs in the designer and model?

Posted: Wed 06 May 2015 03:46
by CodeSlinger
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?

Posted: Wed 06 May 2015 12:51
by Shalex
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.

Re: Any doc on using views and sprocs in the designer and model?

Posted: Thu 07 May 2015 18:10
by CodeSlinger
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.