Oracle CodeFirst

This commit is contained in:
sunkaixuan
2018-11-25 23:45:59 +08:00
parent 10ce6c0f51
commit 197dc82b1d
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ namespace OrmTest.Demo
public class CodeTable
{
[SugarColumn(IsNullable =false ,IsPrimaryKey =true,IsIdentity =true)]
[SugarColumn(IsPrimaryKey =true)]
public int Id { get; set; }
[SugarColumn(Length = 21,OldColumnName = "Name2",ColumnDescription ="haha")]
public string Name{ get; set; }
@@ -23,7 +23,7 @@ namespace OrmTest.Demo
[SugarColumn(IsNullable = true,OldColumnName = "Dob")]
public double? Dob2 { get; set; }
[SugarColumn(Length =110)]
public string A1 { get; set; }
public string A2{ get; set; }
}
public class CodeTable2 {
public int Id { get; set; }

View File

@@ -97,7 +97,7 @@ namespace SqlSugar
{
get
{
return "SELECT TOP {0} * INTO {1} FROM {2}";
return "create table {1} as select * from {2} where ROWNUM<={0}";
}
}
protected override string DropTableSql