mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
Oracle CodeFirst
This commit is contained in:
@@ -9,7 +9,7 @@ namespace OrmTest.Demo
|
|||||||
public class CodeTable
|
public class CodeTable
|
||||||
{
|
{
|
||||||
|
|
||||||
[SugarColumn(IsNullable =false ,IsPrimaryKey =true,IsIdentity =true)]
|
[SugarColumn(IsPrimaryKey =true)]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
[SugarColumn(Length = 21,OldColumnName = "Name2",ColumnDescription ="haha")]
|
[SugarColumn(Length = 21,OldColumnName = "Name2",ColumnDescription ="haha")]
|
||||||
public string Name{ get; set; }
|
public string Name{ get; set; }
|
||||||
@@ -23,7 +23,7 @@ namespace OrmTest.Demo
|
|||||||
[SugarColumn(IsNullable = true,OldColumnName = "Dob")]
|
[SugarColumn(IsNullable = true,OldColumnName = "Dob")]
|
||||||
public double? Dob2 { get; set; }
|
public double? Dob2 { get; set; }
|
||||||
[SugarColumn(Length =110)]
|
[SugarColumn(Length =110)]
|
||||||
public string A1 { get; set; }
|
public string A2{ get; set; }
|
||||||
}
|
}
|
||||||
public class CodeTable2 {
|
public class CodeTable2 {
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return "SELECT TOP {0} * INTO {1} FROM {2}";
|
return "create table {1} as select * from {2} where ROWNUM<={0}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override string DropTableSql
|
protected override string DropTableSql
|
||||||
|
|||||||
Reference in New Issue
Block a user