有没有人有petapoco源代码的部分更新?根据petapoco文档,这个功能应该在那里。
http://www.toptensoftware.com/Articles/116/PetaPoco-Partial-Record-Updates
但是我已经从github下载了源代码,但是缺少部分更新。如果有人有部分更新的源代码,请与我分享。
发布于 2011-11-14 17:22:21
在Github上的当前版本中,有两个“版本”的部分更新方法(也许你需要拉出更改)。一个是关于Database类的:
public int Update(object poco, IEnumerable<string> columns)用法:db.Update(u, new string[] { "last_login" });,其中db是Database的实例
另一个在TT generated Record类中:
public int Update(IEnumerable<string> columns) { return repo.Update(this, columns); }用法:u.Update(new string[] { "last_login" });,其中u是TT生成的Record<T>
https://stackoverflow.com/questions/8119042
复制相似问题