我想使用this泛型CompareObjects类,但似乎Subsonic记录对象不实现IComparable。
User userFromDB = User.SingleOrDefault(x => x.UserName == "CmdrTallen");
User modifiedUser = new User();
TryUpdateModel(modifiedUser);
if(CompareOjbects<User>(userFromDB, modifiedUser) != 0)
{
this.log("User was modified")
//+ Add modified columns collection to log here
}
我是否重新发明了轮子?也许更简单的方法?