1
Reply

web form 2010 work with linq to sql

scampercat

scampercat

Jun 10 2012 8:04 PM
1.3k
I have a question about a C#.net web form 2010 application where I added new tables to two existing different linq to sql files (.dbml). I dragged these two tables from server explorer on to the 2 .dbml files. When I dragged these tables onto the designer, I was asked if I wanted to use a different data source and I said yes.

Everything works fine as long as I use the web.config file I used when I dragged the two tables onto the designers. However this web.config file is used for production. I want to use the web.config file that should really be used for development/testing. When I use the 'real' test/debug web.config file, the application breaks on a line of code saying I need a new instance of the object. The object that is being referred to is the new tables I dragged onto the designer form. Thus can you tell me what I need to do so I can use the 'test' web.config file?

Answers (1)