Description
openedon Oct 8, 2014
This is a meta-issue covering the different aspects of support for mapping to and using views in EF Core. Different parts of this support will be done at different times, so while this issue may be in the Backlog, the individual issues below contain the status for various aspects of view support.
- Query from view with key - this already works; for queries a view with a key is handled the same way as a table. Just define an entity type in the normal way.
- Query Types: Model types that do not require identity #9290
- RevEng: Support Views #1679
- Support for querying objects without keys #1862
- Support raw SQL queries without defining an entity type for the result #10753
- Support updatable views #20013
- Materialised views #20858
- Map inserts, updates, and deletes (CUD operations) to stored procedures #245
- Create views from Migrations
- Scaffold views into SQL definitions on the model #20940
- To vs From methods: Proposal to rationalize ToTable, ToQuery, ToView, FromSql, and other related methods #17270
- Support separation of query and update mapping #15671
- Allow owned entities on a keyless entity type #17890
- Improve documentation for using database views EntityFramework.Docs#480
Please consider voting 👍 for one of the issues above rather than for this overall issue, since that will provide more specific and actionable feedback about the relative importance of different aspects of view support.
Original issue text:
Hi, I have prototyped a really basic (or even less) view support through part of the EF Core stack, currently my prototype is able to
- Map entity to a View via fluent api
- Create a view via migrations
- Read and materialize values backed by views
- Avoid updating entities if backed by views
As stated above, this is a really naive approach and I know there are a tons of unsupported features at the moment, anyway I really would like to improve this further and I would be glad to discuss implementation details with the EF team and the community.
I would like to know if the EF team are interested in this contributions.
Thanks, Max.