【发布时间】:2011-08-22 16:45:42
【问题描述】:
我有一个实体
Entity
{
int Id;
object otherProperties;
List<int> ForeignIds;
}
我写了一个插入 SP,需要:
@Id INT,
@ForeignId INT
如何将列表映射到 SP 以进行修改映射,该修改映射将为 ForeignId 中的每个元素插入一行包含 Id 和来自 ForeignIds 的元素?
例如
Entity(){ id=1; ForeignIds = new List<int>(){2,3};}
将插入:
标识 |外国身份证
1 | 2
1 | 3
【问题讨论】:
标签: entity-framework entity-framework-4 mapping entity-framework-mapping