/// <summary>获取指定时间后更新过的数据数量</summary> /// <param name="last"></param> /// <returns></returns> public virtual Int32 GetAllUpdatedCount(DateTime last) { var name = LastUpdateName; var where = String.IsNullOrEmpty(name) ? null : Facotry.MakeCondition(LastUpdateName, last, ">"); return(Facotry.FindCount(where, null, null, 0, 0)); }
/// <summary>检查在指定时间后更新过的数据</summary> /// <param name="last"></param> /// <param name="start"></param> /// <param name="max"></param> /// <returns></returns> public virtual ISyncMasterEntity[] GetAllUpdated(DateTime last, Int32 start, Int32 max) { var name = LastUpdateName; var where = String.IsNullOrEmpty(name) ? null : Facotry.MakeCondition(LastUpdateName, last, ">"); var list = Facotry.FindAll(where, null, null, start, max); if (list == null || list.Count < 1) { return(null); } // 如果实体类实现了该接口,则返回 if (Facotry.Default is ISyncMasterEntity) { var rs = new ISyncMasterEntity[list.Count]; for (int i = 0; i < list.Count; i++) { rs[i] = list[i] as ISyncMasterEntity; } return(rs); } // 否则采用内置实现 else { var rs = new ISyncMasterEntity[list.Count]; for (int i = 0; i < list.Count; i++) { rs[i] = new SyncMasterEntity(this, list[i]); } return(rs); } }