Exemplo n.º 1
0
 public NodeMoveBetweenDBManager(String SourceDBFileWithPath, String TargetDBFileWithPath)
 {
     //_SourceDBFileWithPath = SourceDBFileWithPath;
     SourceDbContext = new MyDBEntities(DALConfig.getEFConnectionString(SourceDBFileWithPath));
     //_TargetDBFileWithPath = TargetDBFileWithPath;
     TargetDbContext = new MyDBEntities(DALConfig.getEFConnectionString(TargetDBFileWithPath));
 }
Exemplo n.º 2
0
        /// <summary>
        /// 在数据库中查找包容指定字串的记录,返回其路径集合
        /// </summary>
        /// <param name="FindWhat"></param>
        /// <returns></returns>
        public List <String> SearchDataNodeText(String FindWhat, String EFConnectionString)
        {
            using (MyDBEntities context = new MyDBEntities(EFConnectionString))
            {
                List <String> result = new List <string>();


                //搜索文件夹节点表
                var query = from node in context.InfoNodeDBs
                            where node.Text.IndexOf(FindWhat) != -1
                            select node.Path;
                result.AddRange(query.ToList());
                return(result);
            }
        }