Reputation: 131
I have created views in sql how can I use in Linq query
I have get data from many tables and calculate stockIn,stockOut,StockClearence and StockRejection how can i do this by using Views.
Please any one give me the reference website for views using Linq I developed application in c#.net. desktop application
Thanks in advance
Upvotes: 2
Views: 9552
Reputation: 5042
If you have defined the views in you SQL Server Database, they'll appear in the Server Explorer and can be dragged and dropped onto the DBML diagram. The view(s) will not have any relation to other tables. You are suppose to create a related view for your screen requirements and the exact view will be translated by SQL Metal for the DBML file. You can bind the view and/or read it. Views only allow SELECT.
Upvotes: 2
Reputation: 117220
The same as tables. Except that you can't update, insert, delete and have entity relations.
Everything else is the same. Just drop the view on the DBML designer surface.
Upvotes: 2