The essence of the problem is, as always, in performance, a lot of requests are made to the database by sample. Made a convenient presentation in the database itself, now the selection is done in one request.
The question is how to make a view when the database is initialized at the COdeFirst approach? If the first is impossible to do (as I did manually through MS SQL Management Studio), how can I access it in code (since CodeFirst, then the system sees only those tables that are represented by models)?
sqlscript, after creating the view in this way, it can be accessed like this:_context.Database.SqlQuery<КлассМодели>("select * from ВашаВью")- Baldsqlquery in the form of a filled class instance, of course you will have to create a class for the materialization, but you don’t need to add it toDbContext- BaldIdentityDbContextwhich in turn is inherited fromDbContext? - Bald