score:3
Accepted answer
- if you provide this method, you must perform the update in the method.
http://msdn.microsoft.com/en-us/library/bb882671.aspx
- if you implement the insert, update and delete methods in your partial class, the linq to sql runtime will call them instead of its own default methods when submitchanges is called.
try mitabla.onvalidate
score:1
if you want to implement this method but not do the update yourself you make the method call executedynamicupdate(item);
likewise executedynamicdelete and executedynamicinsert for deletemytable and insertmytable respectively.
Source: stackoverflow.com
Related Query
- How to code the partial extensions that Linq to SQL autogenerates?
- How are people unit testing code that uses Linq to SQL
- How can you see the sql that is causing an error on SubmitChanges in LINQ to SQL?
- How to work around the fact that Linq to SQL is using separate SQL DELETE statements for each item in DeleteAllOnSubmit
- How do I write a LINQ to SQL statement with a custom function that needs the compare the current item context to a passed in value?
- How can I see the SQL text that is sent by LINQ to my database?
- How to write SQL translateable linq code that groups by one property and returns distinct list
- How to return anonymous type from c# method that uses LINQ to SQL
- How to count the number of elements that match a condition with LINQ
- How to insert a record with LINQ and C# and return the Primary Key of that record
- Linq to SQL - How to find the value of the IDENTITY column after InsertOnSubmit()
- How to force LINQ to SQL to evaluate the whole query in the database?
- How to implement SkipWhile with Linq to Sql without first loading the whole list into memory?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- Seeing the SQL that LINQ generates
- How to get linq to produce exactly the sql I want?
- How does linq actually execute the code to retrieve data from the data source?
- How can I switch that code to use LINQ
- How does this linq code that splits a sequence work?
- How do I use Linq to find the elements of a list that are not present in another list?
- Using the magic of LINQ - How to call a delegate for each criteria that matches?
- linq - how do you do a query for items in one query source that are not in another one?
- How can I write the following code more elegantly using LINQ query syntax?
- How do I make a streaming LINQ expression that delivers the filtered out items as well as the filtered items?
- How do i prevent Linq from adding a GUID so that SQL server can do it?
- How do I use LINQ to find 5 elements in a row that match one predicate, but where the sixth element doesn't?
- How do I write a LINQ query that inverts the grouping of a hierarchical data source?
- How do LINQ queries against the Entity Framework communicate dates to a SQL Server?
- How do I get results from a Linq query in the order of IDs that I provide?
- Determine the source DataContext for a Linq to Sql query
More Query from same tag
- Filter dataset in repository design pattern C#
- Entity framework insert update problem!
- How to read and modify an xml file using vb.net and linq
- Date comparision using Linq
- Select() dropping items
- Looping through List values in C# and saving them to a CSV
- How to use mulitple conditions in linq C#
- Iterating over an unknown IQueryable's properties?
- comma separated list items with brackets in linq
- Cannot assign LINQ query to variable
- linq with unassigned variable parameters
- .NET when grouping records by hour impossible to use datetime in the select
- How to include values from two tables in a one to many relationship
- Concat strings in a projection (Linq)
- How to get an object with certain type using C# Linq?
- Filter a list of objects with dynamic boolean operators
- Real example of the differences between IQueryable and IEnumerable?
- Using Func<> in Entity Framework Query
- Using Linq to populate a class
- how to get specific fields in asp.net core entity in one to many relationship classes
- Read from CellSet using LINQ
- LINQ: ordering sub objects
- Count XElements Grouped by Parent using LINQ
- System.Linq.Dynamic dynamic column name and parameter
- List<classObject> group by on the objects in C#
- linq.js GroupBy on multiple columns with Sum
- Parsing XML With LINQ Issue
- Linq to Entities - OrderBy Tags (many to many relationship)
- entity framework linq include and grouping
- Sort on list of objects that contains dictionary