Update demo

This commit is contained in:
sunkaixuan 2022-07-31 22:01:02 +08:00
parent 69573308b1
commit bc8b123624
3 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,8 @@ namespace OrmTest
public class Order public class Order
{ {
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)] //不支持自增和主键 (标识主键是用来更新用的)
[SugarColumn(IsPrimaryKey = true)]
public int Id { get; set; } public int Id { get; set; }
public string Name { get; set; } public string Name { get; set; }

View File

@ -8,7 +8,8 @@ namespace OrmTest
[SqlSugar.SugarTable("OrderDetail")] [SqlSugar.SugarTable("OrderDetail")]
public class OrderItem public class OrderItem
{ {
[SqlSugar.SugarColumn(IsPrimaryKey =true, IsIdentity =true)] //不支持自增和主键 (标识主键是用来更新用的)
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
public int ItemId { get; set; } public int ItemId { get; set; }
public int OrderId { get; set; } public int OrderId { get; set; }
public decimal? Price { get; set; } public decimal? Price { get; set; }

View File

@ -8,7 +8,8 @@ namespace OrmTest
{ {
public class RootTable0 public class RootTable0
{ {
[SqlSugar.SugarColumn(IsPrimaryKey =true,IsIdentity =true)] //不支持自增和主键 (标识主键是用来更新用的)
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
public int Id { get; set; } public int Id { get; set; }
public string Name { get; set; } public string Name { get; set; }
[SqlSugar.SugarColumn(IsIgnore =true)] [SqlSugar.SugarColumn(IsIgnore =true)]