/// <summary> /// 只修改对象的特定属性 /// </summary> /// <param name="obj"></param> /// <param name="arrPropertyName">需要修改的属性的数组</param> public static void update(Object obj, String[] arrPropertyName) { if (obj == null) { throw new ArgumentNullException(); } ObjectDB.Update((IEntity)obj, arrPropertyName); ObjectPool.Update((IEntity)obj); }
/// <summary> /// 更新对象,并存入数据库 /// </summary> /// <param name="obj"></param> /// <returns>返回一个结果对象 Result。如果发生错误,则 Result 中包含错误信息</returns> public static Result update(Object obj) { if (obj == null) { throw new ArgumentNullException(); } Result result = ObjectDB.Update((IEntity)obj); ObjectPool.Update((IEntity)obj); return(result); }