This question is locked. New answers and comments are not allowed.
Hi,
(orm q1 2010, sql server 2008, win vista)
I have a question about updating an object using transaction. I try to trace (with sql profiler) the query that has been executed on the db.
The update query traced by the profiler contains in the where clause all the column of the record to be updated.
Is it possible to do the same update by using only primary key without specifying all columm, like hibernate?
Below the code executed e and the query traced:
Regards
Luca
(orm q1 2010, sql server 2008, win vista)
I have a question about updating an object using transaction. I try to trace (with sql profiler) the query that has been executed on the db.
The update query traced by the profiler contains in the where clause all the column of the record to be updated.
Is it possible to do the same update by using only primary key without specifying all columm, like hibernate?
Below the code executed e and the query traced:
| scope.Transaction.Begin();<br>machine.Note = ""; <br>scope.Transaction.Commit();<br><br>UPDATE [Macchina] SET [Codice]=@p0, [DataModifica]=@p1, [IdLinea]=@p2, [IdMacchinaTipo]=@p3, [Note]=@p4, [OrdinamentoSuLinea]=@p5, [IdUtenteModifica]=@p6 WHERE [IdMacchina] = @p7 AND [Codice]=@p8 AND [IdLinea]=@p9 AND [IdMacchinaTipo]=@p10 AND [OrdinamentoSuLinea]=@p11 AND [IdUtenteModifica]=@p12' |
Regards
Luca