public async Task InsertTradeInfoAsync(tradeInfo tradeInfo) { using (IDbConnection conn = new SqlConnection(ConnectionString)) { //对对象进行操作 await conn.InsertAsync(tradeInfo); } }
public void InsertTradeInfo(tradeInfo tradeInfo) { using (IDbConnection conn = new SqlConnection(ConnectionString)) { //对象进行操作 conn.Insert(tradeInfo); } }