我想将返回值转储到 silverlight 应用程序的数据网格中。我写了一个没有键的存储过程,只返回 4 个属性。我已经将该函数导入到实体框架中
- 函数导入名称 :: LecAllInfo
- 存储过程名称 :: LecAllInfo
- 返回 :: Complex 的集合:LecAllInfo_Result
存储过程列信息
StartTime, EndTime, Venue, Purpose
我的域服务类 (OrganizationService.cs) 中的代码
public IQueryable<LecAllInfo_Result> LecAllInfoQuery(string lecId)
{
return this.ObjectContext.LecAllInfo(lecId).AsQueryable<LecAllInfo_Result>();
}
我的元数据中的代码 (OrganizationService.metadata.cs)
[MetadataTypeAttribute(typeof(LecAllInfo_Result.LecAllInfo_ResultMetadata))]
public partial class LecAllInfo_Result
{
internal sealed class LecAllInfo_ResultMetadata
{
private LecAllInfo_ResultMetadata()
{
}
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public string Venue { get; set; }
public string Purpose { get; set; }
}
}
但我未能以通常的方式回调 LecAllInfo,即::
var context = new OrganizationContext();
context.Load(context.GetLecNotificationQuery(((App) Application.Current).GloUid), loadLectNort, null);
context.Load(context.Lec << Unable to Load it
context.Load(context.LecAllInfo("LP123112"), true);
将返回错误和 resharper 告诉我在“OrganizationContext.LecAllInfo”中创建方法
我可以知道我的代码结构是否有问题,或者我如何编辑它而我不知道如何制作它?
当我单击 resharper 选项时,它在 SolutionName.Web.g.cs 创建了这个
public EntityQuery<object> LecAllInfo(string lp123112)
{
throw new NotImplementedException();
}
我遵循了网络上的几个教程,stackoverflow 成员也发布了,但仍然没有这样做。谢谢你的回复