Support read-only mapping to tables without key
Allow mapping of database views without requiring the Key Attribute
When mapping entitis to Views, it´s common that no Key can be set, bescause the view does not provide it and you can´t map it. The idea is:
* Make it possible to map to Views (or tables) in a read only fashion that does not require the Key Attribute
This is included in EF Core 2.1, which is currently in preview.
Please create issues in our issue tracker if you find any problems.
Craig Larsen commented
Make it is easy to use views as a type of simple stored query. Right now, EF wants to make views update-able and when it can't, iterating over the resultset from the view can result in duplicate data. This is huge bug IMO.
There are times I want to show data like a report where I don't need all the required fields from the DB because I will NEVER write the data back. It would be nice to be able to create an entity, limit which CRUD operations it supports, and allow some required fields to not be present in the entity if I don't support CREATE or UPDATE...