I have a 3 tables which need to be joined for doing some queries. The tables are relatively read-only for specific duration of time. Only if there is need, we need to write them.
I want to avoid join on demand for these tables. So I was planning to use Indexed views. However, I didn't find a way to define a view from entity framework (EF 6.1).
Can someone please guide on this?
Regards, Amit Rangari
There is no direct method for creating views from EF 6.
You need to write raw SQL to create the view, then execute it from a dbMigration. For details see: https://msdn.microsoft.com/en-us/magazine/dn519921.aspx