/// <summary>
        /// 按条件删除多条数据
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="dc"></param>
        /// <param name="tentitys"></param>
        /// <param name="fun"></param>
        public static bool DeleteToMany(Expression <Func <Camera, bool> > fun)
        {
            bool rbool = true;

            try
            {
                LinQBaseDao.DeleteToMany <Camera>(new DCCarManagementDataContext(), fun);
            }
            catch
            {
                rbool = false;
            }
            return(rbool);
        }
示例#2
0
        /// <summary>
        /// 按条件删除多条数据
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="dc"></param>
        /// <param name="tentitys"></param>
        /// <param name="fun"></param>
        public static bool DeleteToMany(Expression <Func <UserInfo, bool> > fun)
        {
            bool rbool = true;

            using (DCCarManagementDataContext db = new DCCarManagementDataContext())
            {
                try
                {
                    LinQBaseDao.DeleteToMany <UserInfo>(db, fun);
                }
                catch
                {
                    rbool = false;
                }
                finally { db.Connection.Close(); }
                return(rbool);
            }
        }