Changing a table in DBML file throws error

Someone asked on Stack Overflow:

I had to add a new column to my table so I did that in the database and then I removed the table from the dbml file and readded the one with the new column. So the column I added was (_isActive bit null allowed) and this messed up my designer file. It has added a duplicate definition of some of the attributes like: private bool isActive and other one as private System.Nullable @_isActive; Also added additional stuff. I had to delete the designer file and reload it with old one. How should I go to make this change in the dbml file?

I posted the following answer, which was chosen as the accepted answer and received 1 upvote:

With Linq-To-SQL I believe you need to use the designer to remove and add a table after you have made a schema change.

If you edited the code-behind file, those changes can cause problems. There is a reason all the classes there are defiend as partial class

So, I suspect your best option is to delete your DBML and start again.


Originally posted on Stack Overflow — 1 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.