using System;
using System.Collections.Generic;
using System.Text;
using MySql.Data.MySqlClient;
using Dapper;

namespace Bailun.DC.Services
{
    public class ApiServices
    {
        public static void SaveApiLog(string name, string ip)
        {
            using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
            {
                if (cn.State == System.Data.ConnectionState.Closed)
                {
                    cn.Open();
                }

                cn.ExecuteAsync($"insert dc_api_log (apiname,ip) values ('{name}','{ip}')");
                
            }
        }

    }
}
