Linq query in LinqPad is read-only?
Are all Linq queries(query data from MSSQL) in LinqPad ar开发者_开发技巧e read only? I can't edit data, only read it. Right?
Query below produce read only view and I do not find a way to edit data.
from u in Users
where u.Email == "my@mail.com"
select u
No, you can execute any query in LINQPad, including inserts, updates and deletes.
More info about editing data with LINQ to SQL here:
- Insert, Update, and Delete Operations (LINQ to SQL)
not right, when object linking is not disabled in the initializer objects can be accessed, updated. They will NOT be updated in the database, you will still have to do an SubmitChanges.
精彩评论