示例#1
0
    public static ApiClient GetSiteApiDetails()
    {
        APetaPoco.SetConnectionString("cn1");
        var bm = APetaPoco.PpRetrieveCustomQuery <ApiClient>("SELECT TOP 1 * FROM [ApiClient]");

        if (bm.Success)
        {
            var list = (List <ApiClient>)bm.Data;
            if (list != null && list.Count > 0)
            {
                return(list[0]);
            }
            else
            {
                return(null);
            }
        }
        else
        {
            return(null);
        }
    }