I’m using linq-to-sql to get data from my database. I want to change the name of a table and change the name of 2 columns. I know how to do that but the problem is that I’ve written several queries already against that table and if I change the database, the queries need to change as well.
Is there a way to make changes to the database without having to redo the queries and the datacontext?
Thanks.
At least you need to update the mapping between your Entity and Database (Table name, Column name). All your Queries will still be the same.
The update will be from Visual studio ORM Designer(if you are using)
[OR]
With attribute in Datacontext.
[Table(Name="UpdatedName")]and[Column(Name="UpdatedName")]