首先在xaml中创建集合是一个不可取的方法. 本方法仅作为xaml的学习. 本文略微无聊,主要是编写的东西都是老玩意. 首先是定义一个类,作为你要加载集合的模型. 结构如下 internal class Student { public string Name { get; set; } public int Age { get; set; } } internal class StudentList:List<Student> { } class StringCollect { public…
HQL查询: 1.有关hql查询语句中的问号参数形式,如果出现有多个问号,这对后面设置参数就比较麻烦. 如:from User user where user.name=? and user.age=? and user.sex=? and ...; 对这样的语句赋值,容易出错. 可以采用宁一种命名参数方式解决它. 如: from User user where user.name=:var1 and user.age=:var2 and user.sex=:var3 and ...; quer…