this.storeController.Entity = this.storeController.EntityList.FirstOrDefault();>I'm trying to follow the jump start and create a simple maintance form. I've created the domain service with my own business entity EF. I want to load the first entity when the form loads. The store controller seems to load the entities and my textbox seem to be bound but there is no value assigned. How do I set the storeController.Entity to the first entity in the entitylist ? Iwant to do something like this:
> this.storeController.Entity = this.storeController.EntityList[0]; > >That gives error: >Error 19 Cannot apply indexing with [] to an expression of type 'System.ServiceModel.DomainServices.Client.EntitySet<Mainstreet.GlasAve.WebQuote.Business.StoreEntity>' > >// home page > public partial class Home : mmPage > { > StoreControllerProxy storeController = new StoreControllerProxy(); > > /// <summary> > /// Creates a new <see cref="Home"/> instance. > /// </summary> > public Home() > { > InitializeComponent(); > > this.Title = ApplicationStrings.HomePageTitle; > this.storeController.GetAllEntities(delegate(object s, EventArgs e) > { > int cnt = this.storeController.EntityList.Count; > this.DataContext = this.storeController.EntityList; > > }); > } > > /// <summary> > /// Executes when the user navigates to this page. > /// </summary> > protected override void OnNavigatedTo(NavigationEventArgs e) > { > } > } >>TIA Bill