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
- LINQ query question, needs joins
- Linq -Where clause with not exists?
- how to optimize a linq query c# complex object?
- How to C# Linq Order by using list of strings similar to MySql FIELD
- Why is this implemented as a struct?
- Looking for a linq solution to replace a for-loop
- Timeout Exception in SQL Server using via LINQ Query
- How to write LINQ IN clause query which will work as LIKE operator as well?
- Linq date format
- Get a list of objects from DB, create a ViewModel and populate its property by single LINQ statement
- Filter by dynamic properties
- Specified cast is not valid when using casting
- sum of one column with condition using linq
- How can I format a date in the Select property of an EntityDataSource
- Linq to Entities add Where clause for EXISTS lookup in another table
- Convert object to string using Linq
- LINQ query returning a List<> as a class member
- How can i compare date without time part in linq?
- Linq query for top parents by number of childs, including this number
- finding last saved id using NHibernate LINQ
- select data from first table based on two forigen key in another table using linq
- How to get alternate numbers using Enumerable.Range?
- Get a distinct list of ids from IEnumerable<T>
- comparison operator not supported for type int[] - linq to sql
- Linq to FileHelpers Class
- How to preserve SQL performance that I get with IQueryable<Entity> with a IQueryable<DTO> when using oData?
- How to group data and store them in a new list by group
- LINQ select with more than one condition using OR
- Get all objects from a tree with a particular property using Linq
- LIKE with Linq to Entities