sqlParams?.ToArray() == sqlParams != null ? sqlParams.ToArray() : null
/// <summary> /// 获取最新的数据 /// </summary> /// <returns></returns> public WeldResultModel GetLaseModel() { var sql = @"SELECT TOP 1 * FROM [WeldResult] WITH(NOLOCK) ORDER BY ID DESC"; var typeModel = typeof(WeldResultModel); var modelProperties = MfModelInfo.GetProperties(typeModel); return SqlUtility.GetExeResultToOneModel<WeldResultModel, SqlParameter, SqlDataReader>(dbHelper,DataBaseName, sql,null, modelProperties); }
标签:ToArray,SQL,获取,modelProperties,sql,sqlParams,var,Model,null From: https://www.cnblogs.com/stevenchen2016/p/17798925.html