Here we go for anyone else wanting to do the same. Works like a charm
for me so far. In my humble opinion all the DynamicExecute methods
should be exposed on the DataContext class as they are extremely
handy.

    public void ExecuteDynamicUpdate(object entity) {
            using (DatabaseContext.OpenConnection()) //ConnMgr will
close connection for us
            using (IDatabaseTransaction transaction =
DatabaseContext.Transaction()) {
                var queryContext = new QueryContext(this);
                var updateQuery = QueryBuilder.GetUpdateQuery(entity,
null, queryContext);
                QueryRunner.Update(entity, updateQuery, null);
                transaction.Commit();
            }
        }

Regards,

Greyman.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to