执行SQL 获取一个Model 集合 List<Model>
/// <summary> /// 获取最新的24条数据 /// </summary> /// <returns></returns> public List<WeldResultModel> GetListByLase24() { var sql = @"SELECT TOP 24 * FROM [WeldResult] WITH(NOLOCK) ORDER BY ID DESC"; var typeModel = typeof(WeldResultModel); var modelProperties = MfModelInfo.GetProperties(typeModel); return SqlUtility.GetExeResultToList<WeldResultModel, SqlParameter, SqlDataReader>(dbHelper, DataBaseName, sql, null, modelProperties); }