mirror of
https://github.com/DapperLib/Dapper.git
synced 2026-10-19 06:31:49 +08:00
2171ab1a23
--HG-- rename : Properties/AssemblyInfo.cs => Dapper/Properties/AssemblyInfo.cs rename : SqlMapper.cs => Dapper/SqlMapper.cs rename : SqlMapper.csproj => Tests/DapperTests.csproj rename : EntityFramework/Model.Designer.cs => Tests/EntityFramework/Model.Designer.cs rename : EntityFramework/Model.edmx => Tests/EntityFramework/Model.edmx rename : License.txt => Tests/License.txt rename : Linq2Sql/DataClasses.dbml => Tests/Linq2Sql/DataClasses.dbml rename : Linq2Sql/DataClasses.dbml.layout => Tests/Linq2Sql/DataClasses.dbml.layout rename : Linq2Sql/DataClasses.designer.cs => Tests/Linq2Sql/DataClasses.designer.cs rename : Linq2Sql/Post.cs => Tests/Linq2Sql/Post.cs rename : Massive/Massive.cs => Tests/Massive/Massive.cs rename : NHibernate/Iesi.Collections.dll => Tests/NHibernate/Iesi.Collections.dll rename : NHibernate/LinFu.DynamicProxy.dll => Tests/NHibernate/LinFu.DynamicProxy.dll rename : NHibernate/NHibernate.ByteCode.LinFu.dll => Tests/NHibernate/NHibernate.ByteCode.LinFu.dll rename : NHibernate/NHibernate.dll => Tests/NHibernate/NHibernate.dll rename : NHibernate/NHibernateHelper.cs => Tests/NHibernate/NHibernateHelper.cs rename : NHibernate/Post.hbm.xml => Tests/NHibernate/Post.hbm.xml rename : NHibernate/hibernate.cfg.xml => Tests/NHibernate/hibernate.cfg.xml rename : OrmLite/ServiceStack.Common.dll => Tests/OrmLite/ServiceStack.Common.dll rename : OrmLite/ServiceStack.Interfaces.dll => Tests/OrmLite/ServiceStack.Interfaces.dll rename : OrmLite/ServiceStack.OrmLite.SqlServer.dll => Tests/OrmLite/ServiceStack.OrmLite.SqlServer.dll rename : OrmLite/ServiceStack.OrmLite.dll => Tests/OrmLite/ServiceStack.OrmLite.dll rename : OrmLite/ServiceStack.Text.dll => Tests/OrmLite/ServiceStack.Text.dll rename : PerformanceTests.cs => Tests/PerformanceTests.cs rename : PetaPoco/PetaPoco.cs => Tests/PetaPoco/PetaPoco.cs rename : Program.cs => Tests/Program.cs rename : Properties/AssemblyInfo.cs => Tests/Properties/AssemblyInfo.cs rename : Properties/Settings.Designer.cs => Tests/Properties/Settings.Designer.cs rename : Properties/Settings.settings => Tests/Properties/Settings.settings rename : SubSonic/ActiveRecord.cs => Tests/SubSonic/ActiveRecord.cs rename : SubSonic/ActiveRecord.tt => Tests/SubSonic/ActiveRecord.tt rename : SubSonic/Context.cs => Tests/SubSonic/Context.cs rename : SubSonic/Context.tt => Tests/SubSonic/Context.tt rename : SubSonic/SQLServer.ttinclude => Tests/SubSonic/SQLServer.ttinclude rename : SubSonic/Settings.ttinclude => Tests/SubSonic/Settings.ttinclude rename : SubSonic/StoredProcedures.cs => Tests/SubSonic/StoredProcedures.cs rename : SubSonic/StoredProcedures.tt => Tests/SubSonic/StoredProcedures.tt rename : SubSonic/Structs.cs => Tests/SubSonic/Structs.cs rename : SubSonic/Structs.tt => Tests/SubSonic/Structs.tt rename : SubSonic/SubSonic.Core.dll => Tests/SubSonic/SubSonic.Core.dll rename : Tests.cs => Tests/Tests.cs rename : app.config => Tests/app.config rename : bltoolkit/BLToolkit.4.dll => Tests/bltoolkit/BLToolkit.4.dll
317 lines
8.5 KiB
C#
317 lines
8.5 KiB
C#
|
|
|
|
|
|
using System;
|
|
using SubSonic.Schema;
|
|
using System.Collections.Generic;
|
|
using SubSonic.DataProviders;
|
|
using System.Data;
|
|
|
|
namespace SubSonic {
|
|
|
|
/// <summary>
|
|
/// Table: Posts
|
|
/// Primary Key: Id
|
|
/// </summary>
|
|
|
|
public class PostsTable: DatabaseTable {
|
|
|
|
public PostsTable(IDataProvider provider):base("Posts",provider){
|
|
ClassName = "Post";
|
|
SchemaName = "dbo";
|
|
|
|
|
|
Columns.Add(new DatabaseColumn("Id", this)
|
|
{
|
|
IsPrimaryKey = true,
|
|
DataType = DbType.Int32,
|
|
IsNullable = false,
|
|
AutoIncrement = true,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Text", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.AnsiString,
|
|
IsNullable = false,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = -1
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("CreationDate", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.DateTime,
|
|
IsNullable = false,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("LastChangeDate", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.DateTime,
|
|
IsNullable = false,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter1", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter2", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter3", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter4", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter5", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter6", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter7", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter8", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
Columns.Add(new DatabaseColumn("Counter9", this)
|
|
{
|
|
IsPrimaryKey = false,
|
|
DataType = DbType.Int32,
|
|
IsNullable = true,
|
|
AutoIncrement = false,
|
|
IsForeignKey = false,
|
|
MaxLength = 0
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
public IColumn Id{
|
|
get{
|
|
return this.GetColumn("Id");
|
|
}
|
|
}
|
|
|
|
public static string IdColumn{
|
|
get{
|
|
return "Id";
|
|
}
|
|
}
|
|
|
|
public IColumn Text{
|
|
get{
|
|
return this.GetColumn("Text");
|
|
}
|
|
}
|
|
|
|
public static string TextColumn{
|
|
get{
|
|
return "Text";
|
|
}
|
|
}
|
|
|
|
public IColumn CreationDate{
|
|
get{
|
|
return this.GetColumn("CreationDate");
|
|
}
|
|
}
|
|
|
|
public static string CreationDateColumn{
|
|
get{
|
|
return "CreationDate";
|
|
}
|
|
}
|
|
|
|
public IColumn LastChangeDate{
|
|
get{
|
|
return this.GetColumn("LastChangeDate");
|
|
}
|
|
}
|
|
|
|
public static string LastChangeDateColumn{
|
|
get{
|
|
return "LastChangeDate";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter1{
|
|
get{
|
|
return this.GetColumn("Counter1");
|
|
}
|
|
}
|
|
|
|
public static string Counter1Column{
|
|
get{
|
|
return "Counter1";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter2{
|
|
get{
|
|
return this.GetColumn("Counter2");
|
|
}
|
|
}
|
|
|
|
public static string Counter2Column{
|
|
get{
|
|
return "Counter2";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter3{
|
|
get{
|
|
return this.GetColumn("Counter3");
|
|
}
|
|
}
|
|
|
|
public static string Counter3Column{
|
|
get{
|
|
return "Counter3";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter4{
|
|
get{
|
|
return this.GetColumn("Counter4");
|
|
}
|
|
}
|
|
|
|
public static string Counter4Column{
|
|
get{
|
|
return "Counter4";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter5{
|
|
get{
|
|
return this.GetColumn("Counter5");
|
|
}
|
|
}
|
|
|
|
public static string Counter5Column{
|
|
get{
|
|
return "Counter5";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter6{
|
|
get{
|
|
return this.GetColumn("Counter6");
|
|
}
|
|
}
|
|
|
|
public static string Counter6Column{
|
|
get{
|
|
return "Counter6";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter7{
|
|
get{
|
|
return this.GetColumn("Counter7");
|
|
}
|
|
}
|
|
|
|
public static string Counter7Column{
|
|
get{
|
|
return "Counter7";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter8{
|
|
get{
|
|
return this.GetColumn("Counter8");
|
|
}
|
|
}
|
|
|
|
public static string Counter8Column{
|
|
get{
|
|
return "Counter8";
|
|
}
|
|
}
|
|
|
|
public IColumn Counter9{
|
|
get{
|
|
return this.GetColumn("Counter9");
|
|
}
|
|
}
|
|
|
|
public static string Counter9Column{
|
|
get{
|
|
return "Counter9";
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
} |