view Tools/Templates/SybaseDataModel.generated.cs @ 9:1e85f66cf767 default tip

update bltoolkit
author nickolay
date Thu, 05 Apr 2018 20:53:26 +0300
parents f990fcb411a9
children
line wrap: on
line source

//---------------------------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated by BLToolkit template for T4.
//    Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>
//---------------------------------------------------------------------------------------------------
using System;

using BLToolkit.Data;
using BLToolkit.Data.Linq;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;
using BLToolkit.Validation;

namespace SybaseDataModel
{
	public partial class SybaseDataContext : DbManager
	{
		public Table<BinaryData>      BinaryData      { get { return this.GetTable<BinaryData>();      } }
		public Table<Child>           Child           { get { return this.GetTable<Child>();           } }
		public Table<DataTypeTest>    DataTypeTest    { get { return this.GetTable<DataTypeTest>();    } }
		public Table<Doctor>          Doctor          { get { return this.GetTable<Doctor>();          } }
		public Table<GrandChild>      GrandChild      { get { return this.GetTable<GrandChild>();      } }
		public Table<LinqDataTypes>   LinqDataTypes   { get { return this.GetTable<LinqDataTypes>();   } }
		public Table<Parent>          Parent          { get { return this.GetTable<Parent>();          } }
		public Table<Patient>         Patient         { get { return this.GetTable<Patient>();         } }
		public Table<Person>          Person          { get { return this.GetTable<Person>();          } }
		public Table<sysquerymetrics> sysquerymetrics { get { return this.GetTable<sysquerymetrics>(); } }
		public Table<TestIdentity>    TestIdentity    { get { return this.GetTable<TestIdentity>();    } }
	}

	[TableName(Name="BinaryData")]
	public partial class BinaryData
	{
		[Identity, PrimaryKey(1), Required] public int    BinaryDataID { get; set; } // int(4)
		[                         Required] public byte[] Stamp        { get; set; } // timestamp(8)
		[                         Required] public byte[] Data         { get; set; } // varbinary(1024)
	}

	[TableName(Name="Child")]
	public partial class Child
	{
		[Required] public int ParentID { get; set; } // int(4)
		[Required] public int ChildID  { get; set; } // int(4)
	}

	[TableName(Name="DataTypeTest")]
	public partial class DataTypeTest
	{
		[Identity, PrimaryKey(1), Required       ] public int       DataTypeID { get; set; } // int(4)
		[Nullable                                ] public byte[]    Binary_    { get; set; } // binary(50)
		[                         Required       ] public bool      Boolean_   { get; set; } // bit(1)
		[Nullable                                ] public byte?     Byte_      { get; set; } // tinyint(1)
		[Nullable                                ] public byte[]    Bytes_     { get; set; } // varbinary(50)
		[Nullable                                ] public char?     Char_      { get; set; } // char(1)
		[Nullable                                ] public DateTime? DateTime_  { get; set; } // datetime(8)
		[Nullable                                ] public decimal?  Decimal_   { get; set; } // decimal(10)(20,2)
		[Nullable                                ] public double?   Double_    { get; set; } // float(8)
		[Nullable                                ] public byte[]    Guid_      { get; set; } // varbinary(16)
		[Nullable                                ] public short?    Int16_     { get; set; } // smallint(2)
		[Nullable                                ] public int?      Int32_     { get; set; } // int(4)
		[Nullable                                ] public long?     Int64_     { get; set; } // bigint(8)
		[Nullable                                ] public decimal?  Money_     { get; set; } // money(8)
		[Nullable                                ] public byte?     SByte_     { get; set; } // tinyint(1)
		[Nullable                                ] public float?    Single_    { get; set; } // real(4)
		[Nullable                                ] public byte[]    Stream_    { get; set; } // varbinary(50)
		[Nullable,                MaxLength(  50)] public string    String_    { get; set; } // nvarchar(50)
		[Nullable                                ] public short?    UInt16_    { get; set; } // smallint(2)
		[Nullable                                ] public int?      UInt32_    { get; set; } // int(4)
		[Nullable                                ] public long?     UInt64_    { get; set; } // bigint(8)
		[Nullable,                MaxLength(1000)] public string    Xml_       { get; set; } // nvarchar(1000)
	}

	[TableName(Name="Doctor")]
	public partial class Doctor
	{
		[PrimaryKey(1), Required               ] public int    PersonID { get; set; } // int(4)
		[               MaxLength(50), Required] public string Taxonomy { get; set; } // nvarchar(50)

		// FK_Doctor_Person
		[Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=false)]
		public Person Person { get; set; }
	}

	[TableName(Name="GrandChild")]
	public partial class GrandChild
	{
		[Required] public int ParentID     { get; set; } // int(4)
		[Required] public int ChildID      { get; set; } // int(4)
		[Required] public int GrandChildID { get; set; } // int(4)
	}

	[TableName(Name="LinqDataTypes")]
	public partial class LinqDataTypes
	{
		[          Required     ] public int       ID             { get; set; } // int(4)
		[Nullable               ] public decimal?  MoneyValue     { get; set; } // decimal(6)(10,4)
		[Nullable               ] public DateTime? DateTimeValue  { get; set; } // datetime(8)
		[Nullable               ] public DateTime? DateTimeValue2 { get; set; } // datetime(8)
		[          Required     ] public bool      BoolValue      { get; set; } // bit(1)
		[Nullable, MaxLength(36)] public string    GuidValue      { get; set; } // char(36)
		[Nullable               ] public byte[]    BinaryValue    { get; set; } // binary(500)
		[Nullable               ] public short?    SmallIntValue  { get; set; } // smallint(2)
		[Nullable               ] public int?      IntValue       { get; set; } // int(4)
		[Nullable               ] public long?     BigIntValue    { get; set; } // bigint(8)
	}

	[TableName(Name="Parent")]
	public partial class Parent
	{
		[          Required] public int  ParentID { get; set; } // int(4)
		[Nullable          ] public int? Value1   { get; set; } // int(4)
	}

	[TableName(Name="Patient")]
	public partial class Patient
	{
		[PrimaryKey(1), Required                ] public int    PersonID  { get; set; } // int(4)
		[               MaxLength(256), Required] public string Diagnosis { get; set; } // nvarchar(256)

		// FK_Patient_Person
		[Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=false)]
		public Person Person { get; set; }
	}

	[TableName(Name="Person")]
	public partial class Person
	{
		[Identity, PrimaryKey(1), Required               ] public int    PersonID   { get; set; } // int(4)
		[                         MaxLength(50), Required] public string FirstName  { get; set; } // nvarchar(50)
		[                         MaxLength(50), Required] public string LastName   { get; set; } // nvarchar(50)
		[Nullable,                MaxLength(50)          ] public string MiddleName { get; set; } // nvarchar(50)
		[                         Required               ] public char   Gender     { get; set; } // char(1)

		// FK_Doctor_Person_BackReference
		[Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=true)]
		public Doctor Doctor { get; set; }

		// FK_Patient_Person_BackReference
		[Association(ThisKey="PersonID", OtherKey="PersonID", CanBeNull=true)]
		public Patient Patient { get; set; }
	}

	// View
	[TableName(Name="sysquerymetrics")]
	public partial class sysquerymetrics
	{
		[          Required      ] public int    uid       { get; set; } // int(4)
		[          Required      ] public int    gid       { get; set; } // int(4)
		[          Required      ] public int    hashkey   { get; set; } // int(4)
		[          Required      ] public int    id        { get; set; } // int(4)
		[          Required      ] public short  sequence  { get; set; } // smallint(2)
		[Nullable                ] public int?   exec_min  { get; set; } // int(4)
		[Nullable                ] public int?   exec_max  { get; set; } // int(4)
		[Nullable                ] public int?   exec_avg  { get; set; } // int(4)
		[Nullable                ] public int?   elap_min  { get; set; } // int(4)
		[Nullable                ] public int?   elap_max  { get; set; } // int(4)
		[Nullable                ] public int?   elap_avg  { get; set; } // int(4)
		[Nullable                ] public int?   lio_min   { get; set; } // int(4)
		[Nullable                ] public int?   lio_max   { get; set; } // int(4)
		[Nullable                ] public int?   lio_avg   { get; set; } // int(4)
		[Nullable                ] public int?   pio_min   { get; set; } // int(4)
		[Nullable                ] public int?   pio_max   { get; set; } // int(4)
		[Nullable                ] public int?   pio_avg   { get; set; } // int(4)
		[Nullable                ] public int?   cnt       { get; set; } // int(4)
		[Nullable                ] public int?   abort_cnt { get; set; } // int(4)
		[Nullable, MaxLength(255)] public string qtext     { get; set; } // varchar(255)
	}

	[TableName(Name="TestIdentity")]
	public partial class TestIdentity
	{
		[Identity, PrimaryKey(1), Required] public int ID { get; set; } // int(4)
	}
}