sqlsugar 5.0 是否支持联合主键查询 ,怎样传入联合主键 返回
C#论坛
老数据
2
2299
悬赏:5 飞吻
/// <summary>
/// 自增键
/// </summary>
[SugarColumn(ColumnName = "ID", ColumnDescription = "自增键", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
public long ID { get; set; }
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnName = "Uuid", IsPrimaryKey = true, ColumnDescription = "GUID唯一键", IsNullable = false)]
public string Uuid { get; set; }这是模型Model,使用的是CodeFirst方式建表
我使用的是仓储模式,进行数据库查询,调用GetByIdAsync 怎么传入联合主键
this._agentRepository.GetByIdAsync()
调用InSingleAsync() 时,怎么传入联合主键
Queryable<WeChatWorkAgent>().InSingleAsync()
热忱回答(2)
-
fate stay night VIP0
2020/11/18Queryable<WeChatWorkAgent>().GetList(it=>it.id==a&&it.id2==b) 用这个
0 回复 -
fate stay night VIP0
2020/11/18.single(it=>it.id==1&&it.id2==2)
0 回复