示例#1
0
        static void Main(string[] args)
        {
            using (DBEntity db = new DBEntity())
            {
                //IEnumerable<T_Module> modules = db.GetModuleTree();
                //foreach (T_Module module in modules)
                //{
                //    Console.WriteLine(module.Name);
                //}

                //List<UserBrowseViewModel> models = db.GetUserBrowse(1).ToList();
                //foreach (UserBrowseViewModel m in models)
                //{
                //    Console.WriteLine(m.Name);
                //}
                //Console.WriteLine(models.Count);

                //List<string> operations = db.GetUserOperation(1, 2).ToList();
                //foreach (string o in operations)
                //{
                //    Console.WriteLine(o);
                //}
                //Console.WriteLine(operations.Count);

                //db.DeleteObjects("2,3", "T_UserRole", "UserID");
            }

            Console.WriteLine("ok");
            Console.ReadLine();
        }
示例#2
0
 public IEnumerable<T_Module> GetModuleTree()
 {
     using (DBEntity entity = new DBEntity())
     {
         //return db.ExecuteStoreQuery<T_Module>("CALL GetModuleTree()").ToList();
         return entity.T_Module.ToList();
     }
 }
示例#3
0
 public IEnumerable <T_Module> GetModuleTree()
 {
     using (DBEntity entity = new DBEntity())
     {
         //return db.ExecuteStoreQuery<T_Module>("CALL GetModuleTree()").ToList();
         return(entity.T_Module.ToList());
     }
 }