I have a table called Item.
I have a view called ItemView that returns the entire column Item + another aggregated column that I want to read only.
I need to use it in the Entity Framework, and I don’t know how to use it, because when I insert a view into the constructor all the fields become essential keys, besides, there are no relationships, so I can’t access related tables as nav properties as from the base table.
Is there a way to make them both in the same class? what else can i do?
Say I have an Entity object. after saving this element I want to get my calculated values from the view, how to do it?
I have never used Views in EF, what should be the best practice used in these scenarios?
Any tips, links, blogs, articles, jokes are welcome.
source
share