下面有3个表格,
var queryable = _uow.GetRepository<ChangeSet>().Entities // This is basically the DbSet<ChangeSet>()
.Where(expression)
.SelectMany(c => new
{
ChangeSetId = c.Id,
Timestamp = c.Timestamp,
User = c.User.DisplayName,
EntityType = c.ObjectChanges.SelectMany(o => o.TypeName), //Doesn't work, turns string into char array
//PropertyName = c. this would be a 1 to many on the entity
}
)
注意:描述通常与table1列有关;这些是ui上的复选框,因此来自ui的desciption =复选框名称。
table a ( eid, COLUMNA, COLUMNB, COLUMNC, COLUMND)
1001,1,1,0,1
1002,1,0,0,0
table b (id, description)
1, ABC
2, BCD
3,CDE
4,DEF
我的问题是,我需要将数据从table1迁移到表3中,如下所示
table c(eid, groupid)
以下是我的查询,但未按预期得到结果。
1001,1
1001,2
1001,4
1002,1
错误是什么?