I have a huge .dbml file.
I need to add a column to a Contact table for storing a datetime which will then later be used to determine if the contact should be displayed or not.
I added the column to the table with a sql script.
Inside the code I have a method which gets all contact the following way.
<pre>
var results = from b in _db.Contacts
select b;
</pre>
I made a new server connection in VS2008 to the server and database being used.
I deleted from the .dbml file the “Contact” table
I dragged the Contact Table from the server connection onto the designer surface which recreated the entity which now includes the new column.
Everything builds but while debugging the new code I get the error “Invalid Column Name”
<pre>
var results = from b in _db.Contacts
where b.NoticeExpiryDate <= DateTime.Now
select b;
</pre>
Please can anybody help me get this sorted.
I did try the tool from the following link also but no results.
http://www.huagati.com/dbmltools/
When you have a big solution
Be sure to check all possible con-fig files.
Be sure to run SQL profiler on the database your working on to confirm that you are debugging from the correct database.
Update connection strings to point to the correct server and database.