/// <summary> /// 异步插入单挑数据 /// </summary> /// <param name="info">对象值</param> /// <param name="keyName">主键名字</param> /// <param name="ignoreFields">要忽略的字段</param> /// <param name="isIdentity">是否自增</param> /// <returns>如果是自增则返回自增值,不是返回新增行数</returns> public async Task <object> InsertOneAsync(T info, string keyName = null, string[] ignoreFields = null, bool isIdentity = true) { SqlQuery query = SqlQueryUtil.BuilderInsertOneSqlQuery(info, TableName, keyName: keyName, ignoreFields: ignoreFields, isIdentity: isIdentity, dbType: WriterDataType); if (isIdentity) { return(await GetDataAccess().ExecuteScalarAsync <object>(query)); } return((await GetDataAccess().ExecuteNonQueryAsync(query)).ToString()); }