Can Linq be used for ALTER database tables?

I am trying to programmatically delete a column in a table inside an access database and am unable to do this! Is it possible? it makes me think that I don't have a clear idea of ​​what linq for sql cannot do. Any ideas?

+4
source share
1 answer

There is nothing in LINQ to SQL that allows you to do this without writing T-SQL, no.

Similarly, you cannot perform direct updates or deletions without selecting the data you want to modify and manipulating objects. You will need to write stored procedures for these things and add them to the called model. See this MSDN page for an overview.

Using DataContext.ExecuteQuery should also work, if you don't mind, T-SQL in the source code.

+5
source

All Articles