Mercurial > pub > bltoolkit
comparison Tools/Templates/MySqlDataModel.generated.cs @ 0:f990fcb411a9
Копия текущей версии из github
| author | cin |
|---|---|
| date | Thu, 27 Mar 2014 21:46:09 +0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f990fcb411a9 |
|---|---|
| 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 MySqlDataModel | |
| 16 { | |
| 17 public partial class MySqlDataContext : DbManager | |
| 18 { | |
| 19 public Table<alltypes> alltypes { get { return this.GetTable<alltypes>(); } } | |
| 20 public Table<binarydata> binarydata { get { return this.GetTable<binarydata>(); } } | |
| 21 public Table<child> child { get { return this.GetTable<child>(); } } | |
| 22 public Table<datatypetest> datatypetest { get { return this.GetTable<datatypetest>(); } } | |
| 23 public Table<doctor> doctor { get { return this.GetTable<doctor>(); } } | |
| 24 public Table<grandchild> grandchild { get { return this.GetTable<grandchild>(); } } | |
| 25 public Table<linqdatatypes> linqdatatypes { get { return this.GetTable<linqdatatypes>(); } } | |
| 26 public Table<parent> parent { get { return this.GetTable<parent>(); } } | |
| 27 public Table<patient> patient { get { return this.GetTable<patient>(); } } | |
| 28 public Table<person> person { get { return this.GetTable<person>(); } } | |
| 29 public Table<testidentity> testidentity { get { return this.GetTable<testidentity>(); } } | |
| 30 } | |
| 31 | |
| 32 [TableName(Name="alltypes")] | |
| 33 public partial class alltypes | |
| 34 { | |
| 35 [Identity, PrimaryKey(1), Required ] public int ID { get; set; } // int(10) | |
| 36 [Nullable ] public long? bigintDataType { get; set; } // bigint(19) | |
| 37 [Nullable ] public short? smallintDataType { get; set; } // smallint(5) | |
| 38 [Nullable ] public sbyte? tinyintDataType { get; set; } // tinyint(3) | |
| 39 [Nullable ] public int? mediumintDataType { get; set; } // mediumint(7) | |
| 40 [Nullable ] public int? intDataType { get; set; } // int(10) | |
| 41 [Nullable ] public decimal? numericDataType { get; set; } // decimal(10) | |
| 42 [Nullable ] public decimal? decimalDataType { get; set; } // decimal(10) | |
| 43 [Nullable ] public double? doubleDataType { get; set; } // double(22) | |
| 44 [Nullable ] public float? floatDataType { get; set; } // float(12) | |
| 45 [Nullable ] public DateTime? dateDataType { get; set; } // date | |
| 46 [Nullable ] public DateTime? datetimeDataType { get; set; } // datetime | |
| 47 [Nullable ] public DateTime? timestampDataType { get; set; } // timestamp | |
| 48 [Nullable ] public DateTime? timeDataType { get; set; } // time | |
| 49 [Nullable ] public DateTime? yearDataType { get; set; } // year | |
| 50 [Nullable ] public DateTime? year2DataType { get; set; } // year | |
| 51 [Nullable ] public DateTime? year4DataType { get; set; } // year | |
| 52 [Nullable, MaxLength( 1)] public string charDataType { get; set; } // char(1) | |
| 53 [Nullable, MaxLength( 20)] public string varcharDataType { get; set; } // varchar(20) | |
| 54 [Nullable, MaxLength(65535)] public string textDataType { get; set; } // text(65535) | |
| 55 [Nullable ] public byte[] binaryDataType { get; set; } // binary(3) | |
| 56 [Nullable ] public byte[] varbinaryDataType { get; set; } // varbinary(5) | |
| 57 [Nullable ] public byte[] blobDataType { get; set; } // blob(65535) | |
| 58 [Nullable ] public bool? bitDataType { get; set; } // bit(3) | |
| 59 [Nullable, MaxLength( 5)] public string enumDataType { get; set; } // enum(5) | |
| 60 [Nullable, MaxLength( 7)] public string setDataType { get; set; } // set(7) | |
| 61 } | |
| 62 | |
| 63 [TableName(Name="binarydata")] | |
| 64 public partial class binarydata | |
| 65 { | |
| 66 [Identity, PrimaryKey(1), Required ] public int BinaryDataID { get; set; } // int(10) | |
| 67 [ NonUpdatable(OnInsert = true, OnUpdate = true), Required] public DateTime Stamp { get; set; } // timestamp | |
| 68 [ Required ] public byte[] Data { get; set; } // varbinary(1024) | |
| 69 } | |
| 70 | |
| 71 [TableName(Name="child")] | |
| 72 public partial class child | |
| 73 { | |
| 74 [Nullable] public int? ParentID { get; set; } // int(10) | |
| 75 [Nullable] public int? ChildID { get; set; } // int(10) | |
| 76 } | |
| 77 | |
| 78 [TableName(Name="datatypetest")] | |
| 79 public partial class datatypetest | |
| 80 { | |
| 81 [Identity, PrimaryKey(1), Required ] public int DataTypeID { get; set; } // int(10) | |
| 82 [Nullable ] public byte[] Binary_ { get; set; } // binary(50) | |
| 83 [ Required ] public bool Boolean_ { get; set; } // bit(1) | |
| 84 [Nullable ] public sbyte? Byte_ { get; set; } // tinyint(3) | |
| 85 [Nullable ] public byte[] Bytes_ { get; set; } // varbinary(50) | |
| 86 [Nullable, MaxLength( 1)] public string Char_ { get; set; } // char(1) | |
| 87 [Nullable ] public DateTime? DateTime_ { get; set; } // datetime | |
| 88 [Nullable ] public decimal? Decimal_ { get; set; } // decimal(20,2) | |
| 89 [Nullable ] public float? Double_ { get; set; } // float(12) | |
| 90 [Nullable ] public byte[] Guid_ { get; set; } // varbinary(50) | |
| 91 [Nullable ] public short? Int16_ { get; set; } // smallint(5) | |
| 92 [Nullable ] public int? Int32_ { get; set; } // int(10) | |
| 93 [Nullable ] public long? Int64_ { get; set; } // bigint(19) | |
| 94 [Nullable ] public decimal? Money_ { get; set; } // decimal(20,4) | |
| 95 [Nullable ] public sbyte? SByte_ { get; set; } // tinyint(3) | |
| 96 [Nullable ] public double? Single_ { get; set; } // double(22) | |
| 97 [Nullable ] public byte[] Stream_ { get; set; } // varbinary(50) | |
| 98 [Nullable, MaxLength( 50)] public string String_ { get; set; } // varchar(50) | |
| 99 [Nullable ] public short? UInt16_ { get; set; } // smallint(5) | |
| 100 [Nullable ] public int? UInt32_ { get; set; } // int(10) | |
| 101 [Nullable ] public long? UInt64_ { get; set; } // bigint(19) | |
| 102 [Nullable, MaxLength(1000)] public string Xml_ { get; set; } // varchar(1000) | |
| 103 } | |
| 104 | |
| 105 [TableName(Name="doctor")] | |
| 106 public partial class doctor | |
| 107 { | |
| 108 [PrimaryKey(1), Required ] public int PersonID { get; set; } // int(10) | |
| 109 [ MaxLength(50), Required] public string Taxonomy { get; set; } // varchar(50) | |
| 110 | |
| 111 // FK_Doctor_Person | |
| 112 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=false)] | |
| 113 public person DoctorPerson { get; set; } | |
| 114 } | |
| 115 | |
| 116 [TableName(Name="grandchild")] | |
| 117 public partial class grandchild | |
| 118 { | |
| 119 [Nullable] public int? ParentID { get; set; } // int(10) | |
| 120 [Nullable] public int? ChildID { get; set; } // int(10) | |
| 121 [Nullable] public int? GrandChildID { get; set; } // int(10) | |
| 122 } | |
| 123 | |
| 124 [TableName(Name="linqdatatypes")] | |
| 125 public partial class linqdatatypes | |
| 126 { | |
| 127 [Nullable ] public int? ID { get; set; } // int(10) | |
| 128 [Nullable ] public decimal? MoneyValue { get; set; } // decimal(10,4) | |
| 129 [Nullable ] public DateTime? DateTimeValue { get; set; } // datetime | |
| 130 [Nullable ] public DateTime? DateTimeValue2 { get; set; } // datetime | |
| 131 [Nullable ] public bool? BoolValue { get; set; } // tinyint(3) | |
| 132 [Nullable, MaxLength(36)] public string GuidValue { get; set; } // char(36) | |
| 133 [Nullable ] public byte[] BinaryValue { get; set; } // varbinary(5000) | |
| 134 [Nullable ] public short? SmallIntValue { get; set; } // smallint(5) | |
| 135 [Nullable ] public int? IntValue { get; set; } // int(10) | |
| 136 [Nullable ] public long? BigIntValue { get; set; } // bigint(19) | |
| 137 } | |
| 138 | |
| 139 [TableName(Name="parent")] | |
| 140 public partial class parent | |
| 141 { | |
| 142 [Nullable] public int? ParentID { get; set; } // int(10) | |
| 143 [Nullable] public int? Value1 { get; set; } // int(10) | |
| 144 } | |
| 145 | |
| 146 [TableName(Name="patient")] | |
| 147 public partial class patient | |
| 148 { | |
| 149 [PrimaryKey(1), Required ] public int PersonID { get; set; } // int(10) | |
| 150 [ MaxLength(256), Required] public string Diagnosis { get; set; } // varchar(256) | |
| 151 | |
| 152 // FK_Patient_Person | |
| 153 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=false)] | |
| 154 public person PatientPerson { get; set; } | |
| 155 } | |
| 156 | |
| 157 [TableName(Name="person")] | |
| 158 public partial class person | |
| 159 { | |
| 160 [Identity, PrimaryKey(1), Required ] public int PersonID { get; set; } // int(10) | |
| 161 [ MaxLength(50), Required] public string FirstName { get; set; } // varchar(50) | |
| 162 [ MaxLength(50), Required] public string LastName { get; set; } // varchar(50) | |
| 163 [Nullable, MaxLength(50) ] public string MiddleName { get; set; } // varchar(50) | |
| 164 [ MaxLength( 1), Required] public string Gender { get; set; } // char(1) | |
| 165 | |
| 166 // FK_Doctor_Person_BackReference | |
| 167 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=true)] | |
| 168 public doctor DoctorPerson { get; set; } | |
| 169 | |
| 170 // FK_Patient_Person_BackReference | |
| 171 [Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=true)] | |
| 172 public patient PatientPerson { get; set; } | |
| 173 } | |
| 174 | |
| 175 [TableName(Name="testidentity")] | |
| 176 public partial class testidentity | |
| 177 { | |
| 178 [Identity, PrimaryKey(1), Required] public int ID { get; set; } // int(10) | |
| 179 } | |
| 180 } |
