/// <summary> /// 删除 /// </summary> /// <param name="id"></param> /// <returns></returns> public static void DeleteById(PK id) { T entity = System.Activator.CreateInstance <T>(); PropertyInfo property = typeof(T).GetProperty("Id"); property.SetValue(entity, id, null); ActiveRecordBase.Delete(entity); }
/// <summary> /// 删除 /// </summary> public void Delete(int id) { T t = GetEntity(id); if (t != null) { ActiveRecordBase.Delete(t); } }
/// <summary> /// 删除对象 /// </summary> /// <returns></returns> #region Delete public static bool DAO_Delete(int id) { try { ; ActiveRecordBase <T> .Delete(DAO <T> .Find(id)); return(true); } catch (Exception ex) { //LogHelper.WriteLog(LogTag + ".Delete(int id)", ex); return(false); } }
public new void Delete(T t) { ActiveRecordBase.Delete(t); }
/// <summary> /// 根据实体删除 /// </summary> /// <param name="entity"></param> public void Delelte(T entity) { ActiveRecordBase.Delete(entity); }
public static void DeleteLater(this ActiveRecordBase record) { RealmServer.IOQueue.AddMessage(() => record.Delete()); // leave it as a Lambda Expr to get a complete stacktrace }
public static void DeleteLater(this ActiveRecordBase record) { ServerApp <WCell.RealmServer.RealmServer> .IOQueue.AddMessage((Action)(() => record.Delete())); }