domaincontext

Silverlight DomainContext load with two separate DomainDataSources

烈酒焚心 提交于 2019-12-11 16:49:03
问题 I have a confusion regarding DataContext which i would like someone to confirm or comment please. In plain English, I believe a DataContext is a container which can be filled with entities upon load. e.g. I have two entities named Customers and Orders . I now declare a new DomainContext var ctx = new MyWebServices.MyDomainContext(); I load Customers in a DomainDataSource like this: DomainDataSource ddsCustomer = new DomainDataSource(); ddsCustomer.context = ctx; ddsCustomer.query = ctx

How to do this in VB.NET?

▼魔方 西西 提交于 2019-12-11 13:36:51
问题 i having problem in converting this C# code into VB.net. The loadLecturer seem to be having problem after convert to VB.NET VB code just afterInitializeComponent() context.Load(context.GetLecturesQuery(), LoadLecturer, Nothing) The C# code i wish to convert and debug private void LoadLecturer(LoadOperation<tblLecturer> obj) { foreach (var item in obj.Entities) { cbLID.Items.Add(item.lecturerID + " - " + item.lfirstName + " " + item.llastName); } } 回答1: Given the comment, it sounds like it's