You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be cool if PetaPoco could track changes and update only columns which have been changed.
There is a nice example how to acheve it: https://gist.github.com/fairking/7c07a5af6af49d5da8ccd285020a66ec
In the same way how nhibernate is doing it, but in much simple way.
Example:
publicclassArticle{publicvirtualintId{get;set;}publicvirtualstringName{get;set;}publicvirtualstringDescription{get;set;}}vararticle= db.Single<Article>(123);// Returns proxy
article.Name ="Other name";
Db.Update(article);// Produces: update article set name = 'Other name' where id = 123;// No description included into the query// All article's changes are flushed after the update.
The text was updated successfully, but these errors were encountered:
Would be cool if PetaPoco could track changes and update only columns which have been changed.
There is a nice example how to acheve it: https://gist.github.com/fairking/7c07a5af6af49d5da8ccd285020a66ec
In the same way how nhibernate is doing it, but in much simple way.
Example:
The text was updated successfully, but these errors were encountered: