public Task <bool> ExecuteCommandHasChangeAsync() { Task <bool> result = new Task <bool>(() => { IDeleteable <T> asyncDeleteable = CopyDeleteable(); return(asyncDeleteable.ExecuteCommand() > 0); }); TaskStart(result); return(result); }
/// <summary> /// 按条件删除(物理删除) /// </summary> /// <typeparam name="T">表实体</typeparam> /// <param name="where">条件语句,如:"id=@id"</param> /// <param name="parameters">参数,如:new{id=0}</param> /// <returns>int</returns> public int Delete <T>(string where, object parameters) where T : class, new() { IDeleteable <T> r = _db.Deleteable <T>(); if (!string.IsNullOrEmpty(where)) { r = r.Where(where, parameters); } return(r.ExecuteCommand()); }
public Task <int> ExecuteCommandAsync() { Task <int> result = new Task <int>(() => { IDeleteable <T> asyncDeleteable = CopyDeleteable(); return(asyncDeleteable.ExecuteCommand()); }); TaskStart(result); return(result); }
/// <summary> /// /// </summary> /// <returns></returns> public int ExecuteCommand() { return(_deletable.ExecuteCommand()); }