请告诉我为什么会发生此异常(显然它无法找到某些内容......)以及如何修复它?
CODE
public IEnumerable GetList(GridMetadata metadata) {
var entities = new EPMSEntities();
var items = entities.GetItemSummary(metadata.ProjectId);
//return items.Select(item => new ItemSummaryModel() {
//IdProjectEquipmentItem = item.IdProjectEquipmentItem,
//IdMasterEquipmentItem = item.idMasterEquipmentItem
//}
}
public virtual ObjectResult<GetItemSummary_Result> GetItemSummary(Nullable<int> idProject)
{
var idProjectParameter = idProject.HasValue ?
new ObjectParameter("IdProject", idProject) :
new ObjectParameter("IdProject", typeof(int));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetItemSummary_Result>("GetItemSummary", idProjectParameter); //keep getting error at this point
}
model.edmx
<FunctionImportMapping FunctionImportName="GetItemSummary" FunctionName="EPMSModel.Store.GetItemSummary">.....
我使用的是Microsoft SQL Server 2012 - 11.0.2100.60。 Microsoft.NET-Framework64 v4.0.30319。拥有所有数据库凭据..