Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Silverlight Binding
Message
From
22/08/2011 14:23:18
 
 
To
22/08/2011 13:44:49
Bill Oeftering
Mainstreet Computers, Inc.
Belleville, Michigan, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01521497
Message ID:
01521503
Views:
25
Sounds like a purely EF issue.
I don't think the EntitySet class supports indexing. Try:
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform