Esempio n. 1
0
 /// <summary>
 /// 传入SQL 查询
 /// </summary>
 /// <param name="strsql"></param>
 /// <returns></returns>
 public static IEnumerable <T> GetItemsForListing <T>(string strsql) where T : class
 {
     using (DCCarManagementDataContext db = new DCCarManagementDataContext())
     {
         return(db.ExecuteQuery <T>(strsql).ToList());
     }
 }
        /// <summary>
        /// 连接Linq To Sql 实例
        /// </summary>
        /// <param name="strsql"></param>
        /// <returns></returns>
        public static IEnumerable <Camera> GetCameraForListing(string strsql)
        {
            DCCarManagementDataContext db = new DCCarManagementDataContext();

            var products = db.ExecuteQuery <Camera>(strsql).AsEnumerable();

            return(products);
        }
Esempio n. 3
0
        /// <summary>
        /// 连接Linq To Sql 实例
        /// </summary>
        /// <param name="strsql"></param>
        /// <returns></returns>
        public static IEnumerable <BusinessType> GetFVNForListing(string strsql)
        {
            DCCarManagementDataContext db = new DCCarManagementDataContext();

            var products = db.ExecuteQuery <BusinessType>(strsql).AsEnumerable();

            return(products);
        }