This commit is contained in:
sunkaixuan 2017-06-04 10:20:52 +08:00
parent 967e4cb23b
commit 15dc86ea1b

View File

@ -13,6 +13,21 @@ namespace OrmTest.Demo
public class JoinSql : DemoBase public class JoinSql : DemoBase
{ {
public static void Init() public static void Init()
{
Where();
OrderBy();
}
private static void Where()
{
var db = GetInstance();
//Parameterized processing
string value = "1;drop table Student";
var list = db.Queryable<Student>().Where("id=@id",new { id = value }).ToList();
// Nothing happened
}
private static void OrderBy()
{ {
var db = GetInstance(); var db = GetInstance();
//propertyName is valid //propertyName is valid