0
|
1 //---------------------------------------------------------------------------------------------------
|
|
2 // <auto-generated>
|
|
3 // This code was generated by BLToolkit template for T4.
|
|
4 // Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
5 // </auto-generated>
|
|
6 //---------------------------------------------------------------------------------------------------
|
|
7 using System;
|
|
8
|
|
9 using BLToolkit.Data;
|
|
10 using BLToolkit.Data.Linq;
|
|
11 using BLToolkit.DataAccess;
|
|
12 using BLToolkit.Mapping;
|
|
13 using BLToolkit.Validation;
|
|
14
|
|
15 namespace SybaseDataModel
|
|
16 {
|
|
17 public partial class SybaseDataContext : DbManager
|
|
18 {
|
|
19 public Table<BinaryData> BinaryData { get { return this.GetTable<BinaryData>(); } }
|
|
20 public Table<Child> Child { get { return this.GetTable<Child>(); } }
|
|
21 public Table<DataTypeTest> DataTypeTest { get { return this.GetTable<DataTypeTest>(); } }
|
|
22 public Table<Doctor> Doctor { get { return this.GetTable<Doctor>(); } }
|
|
23 public Table<GrandChild> GrandChild { get { return this.GetTable<GrandChild>(); } }
|
|
24 public Table<LinqDataTypes> LinqDataTypes { get { return this.GetTable<LinqDataTypes>(); } }
|
|
25 public Table<Parent> Parent { get { return this.GetTable<Parent>(); } }
|
|
26 public Table<Patient> Patient { get { return this.GetTable<Patient>(); } }
|
|
27 public Table<Person> Person { get { return this.GetTable<Person>(); } }
|
|
28 public Table<sysquerymetrics> sysquerymetrics { get { return this.GetTable<sysquerymetrics>(); } }
|
|
29 public Table<TestIdentity> TestIdentity { get { return this.GetTable<TestIdentity>(); } }
|
|
30 }
|
|
31
|
|
32 [TableName(Name="BinaryData")]
|
|
33 public partial class BinaryData
|
|
34 {
|
|
35 [Identity, PrimaryKey(1), Required] public int BinaryDataID { get; set; } // int(4)
|
|
36 [ Required] public byte[] Stamp { get; set; } // timestamp(8)
|
|
37 [ Required] public byte[] Data { get; set; } // varbinary(1024)
|
|
38 }
|
|
39
|
|
40 [TableName(Name="Child")]
|
|
41 public partial class Child
|
|
42 {
|
|
43 [Required] public int ParentID { get; set; } // int(4)
|
|
44 [Required] public int ChildID { get; set; } // int(4)
|
|
45 }
|
|
46
|
|
47 [TableName(Name="DataTypeTest")]
|
|
48 public partial class DataTypeTest
|
|
49 {
|
|
50 [Identity, PrimaryKey(1), Required ] public int DataTypeID { get; set; } // int(4)
|
|
51 [Nullable ] public byte[] Binary_ { get; set; } // binary(50)
|
|
52 [ Required ] public bool Boolean_ { get; set; } // bit(1)
|
|
53 [Nullable ] public byte? Byte_ { get; set; } // tinyint(1)
|
|
54 [Nullable ] public byte[] Bytes_ { get; set; } // varbinary(50)
|
|
55 [Nullable ] public char? Char_ { get; set; } // char(1)
|
|
56 [Nullable ] public DateTime? DateTime_ { get; set; } // datetime(8)
|
|
57 [Nullable ] public decimal? Decimal_ { get; set; } // decimal(10)(20,2)
|
|
58 [Nullable ] public double? Double_ { get; set; } // float(8)
|
|
59 [Nullable ] public byte[] Guid_ { get; set; } // varbinary(16)
|
|
60 [Nullable ] public short? Int16_ { get; set; } // smallint(2)
|
|
61 [Nullable ] public int? Int32_ { get; set; } // int(4)
|
|
62 [Nullable ] public long? Int64_ { get; set; } // bigint(8)
|
|
63 [Nullable ] public decimal? Money_ { get; set; } // money(8)
|
|
64 [Nullable ] public byte? SByte_ { get; set; } // tinyint(1)
|
|
65 [Nullable ] public float? Single_ { get; set; } // real(4)
|
|
66 [Nullable ] public byte[] Stream_ { get; set; } // varbinary(50)
|
|
67 [Nullable, MaxLength( 50)] public string String_ { get; set; } // nvarchar(50)
|
|
68 [Nullable ] public short? UInt16_ { get; set; } // smallint(2)
|
|
69 [Nullable ] public int? UInt32_ { get; set; } // int(4)
|
|
70 [Nullable ] public long? UInt64_ { get; set; } // bigint(8)
|
|
71 [Nullable, MaxLength(1000)] public string Xml_ { get; set; } // nvarchar(1000)
|
|
72 }
|
|
73
|
|
74 [TableName(Name="Doctor")]
|
|
75 public partial class Doctor
|
|
76 {
|
|
77 [PrimaryKey(1), Required ] public int PersonID { get; set; } // int(4)
|
|
78 [ MaxLength(50), Required] public string Taxonomy { get; set; } // nvarchar(50)
|
|
79
|
|
80 // FK_Doctor_Person
|
|
81 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=false)]
|
|
82 public Person Person { get; set; }
|
|
83 }
|
|
84
|
|
85 [TableName(Name="GrandChild")]
|
|
86 public partial class GrandChild
|
|
87 {
|
|
88 [Required] public int ParentID { get; set; } // int(4)
|
|
89 [Required] public int ChildID { get; set; } // int(4)
|
|
90 [Required] public int GrandChildID { get; set; } // int(4)
|
|
91 }
|
|
92
|
|
93 [TableName(Name="LinqDataTypes")]
|
|
94 public partial class LinqDataTypes
|
|
95 {
|
|
96 [ Required ] public int ID { get; set; } // int(4)
|
|
97 [Nullable ] public decimal? MoneyValue { get; set; } // decimal(6)(10,4)
|
|
98 [Nullable ] public DateTime? DateTimeValue { get; set; } // datetime(8)
|
|
99 [Nullable ] public DateTime? DateTimeValue2 { get; set; } // datetime(8)
|
|
100 [ Required ] public bool BoolValue { get; set; } // bit(1)
|
|
101 [Nullable, MaxLength(36)] public string GuidValue { get; set; } // char(36)
|
|
102 [Nullable ] public byte[] BinaryValue { get; set; } // binary(500)
|
|
103 [Nullable ] public short? SmallIntValue { get; set; } // smallint(2)
|
|
104 [Nullable ] public int? IntValue { get; set; } // int(4)
|
|
105 [Nullable ] public long? BigIntValue { get; set; } // bigint(8)
|
|
106 }
|
|
107
|
|
108 [TableName(Name="Parent")]
|
|
109 public partial class Parent
|
|
110 {
|
|
111 [ Required] public int ParentID { get; set; } // int(4)
|
|
112 [Nullable ] public int? Value1 { get; set; } // int(4)
|
|
113 }
|
|
114
|
|
115 [TableName(Name="Patient")]
|
|
116 public partial class Patient
|
|
117 {
|
|
118 [PrimaryKey(1), Required ] public int PersonID { get; set; } // int(4)
|
|
119 [ MaxLength(256), Required] public string Diagnosis { get; set; } // nvarchar(256)
|
|
120
|
|
121 // FK_Patient_Person
|
|
122 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=false)]
|
|
123 public Person Person { get; set; }
|
|
124 }
|
|
125
|
|
126 [TableName(Name="Person")]
|
|
127 public partial class Person
|
|
128 {
|
|
129 [Identity, PrimaryKey(1), Required ] public int PersonID { get; set; } // int(4)
|
|
130 [ MaxLength(50), Required] public string FirstName { get; set; } // nvarchar(50)
|
|
131 [ MaxLength(50), Required] public string LastName { get; set; } // nvarchar(50)
|
|
132 [Nullable, MaxLength(50) ] public string MiddleName { get; set; } // nvarchar(50)
|
|
133 [ Required ] public char Gender { get; set; } // char(1)
|
|
134
|
|
135 // FK_Doctor_Person_BackReference
|
|
136 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=true)]
|
|
137 public Doctor Doctor { get; set; }
|
|
138
|
|
139 // FK_Patient_Person_BackReference
|
|
140 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=true)]
|
|
141 public Patient Patient { get; set; }
|
|
142 }
|
|
143
|
|
144 // View
|
|
145 [TableName(Name="sysquerymetrics")]
|
|
146 public partial class sysquerymetrics
|
|
147 {
|
|
148 [ Required ] public int uid { get; set; } // int(4)
|
|
149 [ Required ] public int gid { get; set; } // int(4)
|
|
150 [ Required ] public int hashkey { get; set; } // int(4)
|
|
151 [ Required ] public int id { get; set; } // int(4)
|
|
152 [ Required ] public short sequence { get; set; } // smallint(2)
|
|
153 [Nullable ] public int? exec_min { get; set; } // int(4)
|
|
154 [Nullable ] public int? exec_max { get; set; } // int(4)
|
|
155 [Nullable ] public int? exec_avg { get; set; } // int(4)
|
|
156 [Nullable ] public int? elap_min { get; set; } // int(4)
|
|
157 [Nullable ] public int? elap_max { get; set; } // int(4)
|
|
158 [Nullable ] public int? elap_avg { get; set; } // int(4)
|
|
159 [Nullable ] public int? lio_min { get; set; } // int(4)
|
|
160 [Nullable ] public int? lio_max { get; set; } // int(4)
|
|
161 [Nullable ] public int? lio_avg { get; set; } // int(4)
|
|
162 [Nullable ] public int? pio_min { get; set; } // int(4)
|
|
163 [Nullable ] public int? pio_max { get; set; } // int(4)
|
|
164 [Nullable ] public int? pio_avg { get; set; } // int(4)
|
|
165 [Nullable ] public int? cnt { get; set; } // int(4)
|
|
166 [Nullable ] public int? abort_cnt { get; set; } // int(4)
|
|
167 [Nullable, MaxLength(255)] public string qtext { get; set; } // varchar(255)
|
|
168 }
|
|
169
|
|
170 [TableName(Name="TestIdentity")]
|
|
171 public partial class TestIdentity
|
|
172 {
|
|
173 [Identity, PrimaryKey(1), Required] public int ID { get; set; } // int(4)
|
|
174 }
|
|
175 }
|