public Task <int> ExecuteCommandAsync() { Task <int> result = new Task <int>(() => { IInsertable <T> asyncInsertable = CopyInsertable(); return(asyncInsertable.ExecuteCommand()); }); result.Start(); return(result); }
public int Insert <T>(T entity, Expression <Func <T, object> > pk = null, bool isIdentity = true) where T : class, new() { IInsertable <T> insertObj = _db.Insertable(entity); if (pk != null) { insertObj = insertObj.IgnoreColumns(pk); } if (isIdentity) { return(insertObj.ExecuteReturnIdentity()); } return(insertObj.ExecuteCommand()); }
/// <summary> /// /// </summary> /// <returns></returns> public int ExecuteCommand() { return(_insertable.ExecuteCommand()); }