Silverlight アプリケーションのデータグリッドにリターンをダンプしたい。キーのないストアド プロシージャを作成し、4 つのプロパティを返すだけです。関数をEntity Frameworkにインポートしました
- 関数インポート名 :: 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);
エラーが返され、「OrganizationContext.LecAllInfo」にメソッドを作成するようにresharperが指示します
コードの構造に何か問題があるのか 、それを作成する方法がわからないときにこれを編集するにはどうすればよいですか??
resharper オプションをクリックすると、これが SolutionName.Web.g.cs に作成されました
public EntityQuery<object> LecAllInfo(string lp123112)
{
throw new NotImplementedException();
}
Web で利用可能ないくつかのチュートリアルに従いました。stackoverflow メンバーも同様に投稿しましたが、それでも失敗しました。返信ありがとうございます