public async Task InsertAsync(MerchantSupportCrypto supportCrypto) { const string sql = @"INSERT INTO [dbo].[MerchantSupportCryptos]([MerchantInfoId],[CryptoId],[CryptoCode]) VALUES (@MerchantInfoId,@CryptoId,@CryptoCode)"; using (var con = await WriteConnectionAsync()) { await con.ExecuteAsync(sql, supportCrypto); } }
public void Insert(MerchantSupportCrypto supportCrypto) { const string sql = @"INSERT INTO [dbo].[MerchantSupportCryptos]([MerchantInfoId],[CryptoId],[CryptoCode]) VALUES (@MerchantInfoId,@CryptoId,@CryptoCode)"; using (var con = WriteConnection()) { con.Execute(sql, supportCrypto); } }