1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
using
PWMIS.SqlMapper.Entity;
namespace
PLZDModel
{
public
class
PFT_Report : Entity
{
public
PFT_Report()
{
TableName =
"PFT_Report"
;
//IdentityName = "标识列";//如果指定了标识列,可以处理自增列插入问题
//PrimaryKeys.Add("主键列");//指定主键列方可以删除和更新实体数据
AddProperty(
"ID"
,
default
(System.Int32));
AddProperty(
"FinancialPlanersNo"
,
default
(System.String));
AddProperty(
"FundAccount"
,
default
(System.String));
AddProperty(
"CityCode"
,
default
(System.String));
AddProperty(
"BankCode"
,
default
(System.String));
AddProperty(
"NetWork"
,
default
(System.String));
AddProperty(
"ApplyTime"
,
default
(System.DateTime));
AddProperty(
"FileName"
,
default
(System.String));
AddProperty(
"GenerateTime"
,
default
(System.DateTime));
}
public
System.Int32 ID
{
get
{
return
(System.Int32)getProperty(
"ID"
); }
set
{ setProperty(
"ID"
, value); }
}
public
System.String FinancialPlanersNo
{
get
{
return
(System.String)getProperty(
"FinancialPlanersNo"
); }
set
{ setProperty(
"FinancialPlanersNo"
, value); }
}
public
System.String FundAccount
{
get
{
return
(System.String)getProperty(
"FundAccount"
); }
set
{ setProperty(
"FundAccount"
, value); }
}
public
System.String CityCode
{
get
{
return
(System.String)getProperty(
"CityCode"
); }
set
{ setProperty(
"CityCode"
, value); }
}
public
System.String BankCode
{
get
{
return
(System.String)getProperty(
"BankCode"
); }
set
{ setProperty(
"BankCode"
, value); }
}
public
System.String NetWork
{
get
{
return
(System.String)getProperty(
"NetWork"
); }
set
{ setProperty(
"NetWork"
, value); }
}
public
System.DateTime ApplyTime
{
get
{
return
(System.DateTime)getProperty(
"ApplyTime"
); }
set
{ setProperty(
"ApplyTime"
, value); }
}
public
System.String FileName
{
get
{
return
(System.String)getProperty(
"FileName"
); }
set
{ setProperty(
"FileName"
, value); }
}
public
System.DateTime GenerateTime
{
get
{
return
(System.DateTime)getProperty(
"GenerateTime"
); }
set
{ setProperty(
"GenerateTime"
, value); }
}
}
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class
Program
{
static
void
Main(
string
[] args)
{
PFT_Report utlReport =
new
PFT_Report();
OQL oqlQuerry =
new
OQL(utlReport);
utlReport.FundAccount =
"1234234242423"
;
oqlQuerry.TopCount = 3;
oqlQuerry.Select(utlReport.ApplyTime , utlReport.BankCode,utlReport.FileName ,utlReport.FundAccount )
.Where(utlReport.FundAccount)
.OrderBy(utlReport.GenerateTime,
"desc"
);
Console.WriteLine (
"SQL="
+oqlQuerry.ToString ());
Console.Read();
}
|
1
2
3
|
PFT_Report utlReport =
new
PFT_Report();
utlReport.FundAccount =
"1234234242423"
;
EntityQuery
|