I have a dmbl with a bunch of tables and some views where I set up an Association in the Designer from the View to the Table. Then in code I try and write some code that "uses" that association and it isn't there. I look in the designer file and I don't see anything in there either.
Strange thing is I have done this before successfully with these same tables and views in a different dbml and project. All that changed was we moved everything from a 2005 SQL Server to a 2008R2 Box.
Linq2SQL does this if your 'view' does not have a primary key. So add a pseudo one L2S can use. :)
Views can be added to the design and manual associations can be added between them and other tables/views. However, the association will not create a parent/child property in the code unless you modify the view properties to define "primary keys".
https://conficient.wordpress.com/2008/06/04/linq-to-sql-faq-associations-to-views/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With