【发布时间】:2013-01-18 01:29:57
【问题描述】:
我正在尝试编写一个代码,其中 EntityCollection 是方法的参数 但我不知道正确的编码是什么
有人可以帮我解决这个问题吗?
这里是示例代码
//by the way, this is a wrong coding, I am just showing you, what is the thing that I want to do...
private void sampleMethod(EntityCollection a)
{
if (a.ToList().Count == 0)
{
//body
}
}
当我调用它时,它就是这个样子
sampleMethod(employee.EducationalBackground);
【问题讨论】:
-
我无法理解您在寻找什么……正确编码是什么意思?
-
正确的数据类型/类,例如“employee.EducationalBackrground”,因此我可以将其用作方法中的参数。
标签: c# entity-framework-4 entitycollection