<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Index was outside the bounds of the array.</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Index was outside the bounds of the array.</description>
  <pubDate>Wed, 29 Jul 2026 01:35:19 -700</pubDate>
  <lastBuildDate>Tue, 21 Sep 2010 18:04:45 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2168</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Index was outside the bounds of the array. : Cool. Glad you found it! </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8588#8588</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 21-Sep-2010 at 6:04pm<br /><br />Cool. &nbsp;Glad you found it!]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 18:04:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8588#8588</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : Hi, I found the problem.  When...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8581#8581</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=595" rel="nofollow">sky40627</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 20-Sep-2010 at 10:52pm<br /><br />Hi, I found the problem.<DIV>&nbsp;</DIV><DIV>When creating entities in the edmx instead of in the database, the languageId is not set as a property and the Referential Constraint is not set, which is causing the error.</DIV><DIV>&nbsp;</DIV><DIV>Once I took care of those 2 things all went fine.</DIV>]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 22:52:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8581#8581</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : Yes, you need to create the EDMX...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8575#8575</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 20-Sep-2010 at 3:05pm<br /><br />Yes, you need to create the EDMX with&nbsp;<span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">IncludeForeignKeys set to 'on'. &nbsp;Are you deleting any properties in the model? &nbsp;e.g. if Customer has a LanguageID property, the LanguageID should be a property on the Customer entity (some people want to delete the underlying foreign keys).</span><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">If you can't figure it out, post the EDMX and we'll take a look.</span></div><div><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></div>]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 15:05:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8575#8575</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : sorry but i am here again  ...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8564#8564</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=595" rel="nofollow">sky40627</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 20-Sep-2010 at 3:32am<br /><br />sorry but i am here again<DIV>&nbsp;</DIV><DIV>&nbsp; #error DevForce requires that foreign key columns be included in the model. This must be set when the EDMX is first created. If you are upgrading from DevForce 2009, you cannot use the old model and should recreate it using the Entity Framework for .NET 4.0.&nbsp; The following associations were not set up with foreign key associations enabled: LanguageCustomer</DIV><DIV>&nbsp;</DIV><DIV>since i upgraded to 6.0.5 i get this error</DIV><DIV>&nbsp;</DIV><DIV>but my edmx was create new and with IncludeForeignKeys chipped on</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 03:32:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8564#8564</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : in my edmx the IncludeForeignKeysInModel=True so...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8563#8563</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=595" rel="nofollow">sky40627</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 20-Sep-2010 at 3:26am<br /><br /><DIV>in my edmx the IncludeForeignKeysInModel=True</DIV><DIV>so i removed the errorline generate by defvorce</DIV><DIV>&nbsp;</DIV><DIV>&lt;DesignerInfoPropertySet&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DesignerProperty Name="ValidateOnBuild" Value="true" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DesignerProperty Name="EnablePluralization" Value="True" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;DesignerProperty Name="IncludeForeignKeysInModel" Value="True" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/DesignerInfoPropertySet&gt;</DIV><DIV>&nbsp;</DIV><DIV>these are my Customer properties</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; #region Properties</DIV><P>&nbsp;&nbsp;&nbsp; #region Id property</P><P>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;Gets or sets the Id. &lt;/summary&gt;<BR>&nbsp;&nbsp;&nbsp; &#091;Bindable(true, BindingDirection.TwoWay)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;Editable(true)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;Display(Name="Id", AutoGenerateField=true)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;IbVal.RequiredValueVerifier( ErrorMessageResourceName="Customer_Id")&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;<BR>&nbsp;&nbsp;&nbsp; public int Id {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return PropertyMetadata.Id.GetValue(this); }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set { PropertyMetadata.Id.SetValue(this, value); }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; #endregion Id property</P><P>&nbsp;&nbsp;&nbsp; #region Name property</P><P>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;Gets or sets the Name. &lt;/summary&gt;<BR>&nbsp;&nbsp;&nbsp; &#091;Bindable(true, BindingDirection.TwoWay)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;Editable(true)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;Display(Name="Name", AutoGenerateField=true)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;IbVal.RequiredValueVerifier( ErrorMessageResourceName="Customer_Name")&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;<BR>&nbsp;&nbsp;&nbsp; public string Name {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return PropertyMetadata.Name.GetValue(this); }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set { PropertyMetadata.Name.SetValue(this, value); }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; #endregion Name property<BR>&nbsp;&nbsp;&nbsp; #endregion Properties</P><P>&nbsp;&nbsp;&nbsp; #region Navigation properties</P><P>&nbsp;&nbsp;&nbsp; #region Language property</P><P>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;Gets or sets the Language. &lt;/summary&gt;<BR>&nbsp;&nbsp;&nbsp; &#091;Bindable(false)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;Display(Name="Language", AutoGenerateField=false)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;IbEm.RelationProperty("LanguageCustomer", IbEm.QueryDirection.ToRole1)&#093;<BR>&nbsp;&nbsp;&nbsp; public Language Language {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return PropertyMetadata.Language.GetValue(this); }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set { PropertyMetadata.Language.SetValue(this, value); }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; #endregion Language property<BR>&nbsp;&nbsp;&nbsp; #endregion Navigation properties</P><DIV></DIV><DIV></DIV>I hope you have enough information to help me with my problem]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 03:26:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8563#8563</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : when i do an include as here below...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8562#8562</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=595" rel="nofollow">sky40627</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 20-Sep-2010 at 3:18am<br /><br />when i do an include as here below it works <DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //foreach (var item in manager.Customers)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp; MessageBox.Show(item.Language.Name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var qry = manager.Customers<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Include(ClassLibrary1.Customer.PathFor(c=&gt;c.Language));</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (var item in qry)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(item.Language.Name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 03:18:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8562#8562</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : I did the upgrade to 6.0.5 i was...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8561#8561</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=595" rel="nofollow">sky40627</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 20-Sep-2010 at 2:42am<br /><br />I did the upgrade to 6.0.5 i was working with 6.0.4<DIV>&nbsp;</DIV><DIV>I deleted my edmx and the .tt ....</DIV><DIV>&nbsp;</DIV><DIV>I recreated a new edmx from a blank database and made sure the foreign key was "on"</DIV><DIV>&nbsp;</DIV><DIV>still the same error</DIV><DIV>&nbsp;</DIV><DIV>What exactly do you mean by real properties and not hidden ?</DIV>]]>
   </description>
   <pubDate>Mon, 20 Sep 2010 02:42:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8561#8561</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : Make sure that you are using DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8556#8556</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 17-Sep-2010 at 4:31pm<br /><br />Make sure that you are using DevForce 6.0.5 as we fixed a bug (B1537) that had this symptom. &nbsp;Also, confirm that the foreign keys are real properties on the model and are not "hidden" in the edmx.<div><br></div>]]>
   </description>
   <pubDate>Fri, 17 Sep 2010 16:31:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8556#8556</guid>
  </item> 
  <item>
   <title>Index was outside the bounds of the array. : I created a new test app in the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8546#8546</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=595" rel="nofollow">sky40627</a><br /><strong>Subject:</strong> 2168<br /><strong>Posted:</strong> 17-Sep-2010 at 10:47am<br /><br /><P>I created a new test app</P><P>in the edmx i created two entities "Customer" and "Language" adding an association between the two so Customer has a language and Language has Customers</P><P>then I generated the sql to create the database</P><P>-- --------------------------------------------------<BR>-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure<BR>-- --------------------------------------------------<BR>-- Date Created: 09/17/2010 19:39:39<BR>-- Generated from EDMX file: c:\users\koen.skn\documents\visual studio 2010\Projects\WindowsFormsApplication1\ClassLibrary1\Model1.edmx<BR>-- --------------------------------------------------<BR>SET QUOTED_IDENTIFIER OFF;<BR>GO<BR>USE &#091;test&#093;;<BR>GO<BR>IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA &#091;dbo&#093;');<BR>GO<BR>-- --------------------------------------------------<BR>-- Dropping existing FOREIGN KEY constraints<BR>-- --------------------------------------------------<BR>IF OBJECT_ID(N'&#091;dbo&#093;.&#091;FK_LanguageCustomer&#093;', 'F') IS NOT NULL<BR>&nbsp;&nbsp;&nbsp; ALTER TABLE &#091;dbo&#093;.&#091;Customers&#093; DROP CONSTRAINT &#091;FK_LanguageCustomer&#093;;<BR>GO<BR>-- --------------------------------------------------<BR>-- Dropping existing tables<BR>-- --------------------------------------------------<BR>IF OBJECT_ID(N'&#091;dbo&#093;.&#091;Customers&#093;', 'U') IS NOT NULL<BR>&nbsp;&nbsp;&nbsp; DROP TABLE &#091;dbo&#093;.&#091;Customers&#093;;<BR>GO<BR>IF OBJECT_ID(N'&#091;dbo&#093;.&#091;Languages&#093;', 'U') IS NOT NULL<BR>&nbsp;&nbsp;&nbsp; DROP TABLE &#091;dbo&#093;.&#091;Languages&#093;;<BR>GO<BR>-- --------------------------------------------------<BR>-- Creating all tables<BR>-- --------------------------------------------------<BR>-- Creating table 'Customers'<BR>CREATE TABLE &#091;dbo&#093;.&#091;Customers&#093; (<BR>&nbsp;&nbsp;&nbsp; &#091;Id&#093; int IDENTITY(1,1) NOT NULL,<BR>&nbsp;&nbsp;&nbsp; &#091;Name&#093; nvarchar(max)&nbsp; NOT NULL,<BR>&nbsp;&nbsp;&nbsp; &#091;Language_Id&#093; int&nbsp; NOT NULL<BR>);<BR>GO<BR>-- Creating table 'Languages'<BR>CREATE TABLE &#091;dbo&#093;.&#091;Languages&#093; (<BR>&nbsp;&nbsp;&nbsp; &#091;Id&#093; int IDENTITY(1,1) NOT NULL,<BR>&nbsp;&nbsp;&nbsp; &#091;Name&#093; nvarchar(max)&nbsp; NOT NULL<BR>);<BR>GO<BR>-- --------------------------------------------------<BR>-- Creating all PRIMARY KEY constraints<BR>-- --------------------------------------------------<BR>-- Creating primary key on &#091;Id&#093; in table 'Customers'<BR>ALTER TABLE &#091;dbo&#093;.&#091;Customers&#093;<BR>ADD CONSTRAINT &#091;PK_Customers&#093;<BR>&nbsp;&nbsp;&nbsp; PRIMARY KEY CLUSTERED (&#091;Id&#093; ASC);<BR>GO<BR>-- Creating primary key on &#091;Id&#093; in table 'Languages'<BR>ALTER TABLE &#091;dbo&#093;.&#091;Languages&#093;<BR>ADD CONSTRAINT &#091;PK_Languages&#093;<BR>&nbsp;&nbsp;&nbsp; PRIMARY KEY CLUSTERED (&#091;Id&#093; ASC);<BR>GO<BR>-- --------------------------------------------------<BR>-- Creating all FOREIGN KEY constraints<BR>-- --------------------------------------------------<BR>-- Creating foreign key on &#091;Language_Id&#093; in table 'Customers'<BR>ALTER TABLE &#091;dbo&#093;.&#091;Customers&#093;<BR>ADD CONSTRAINT &#091;FK_LanguageCustomer&#093;<BR>&nbsp;&nbsp;&nbsp; FOREIGN KEY (&#091;Language_Id&#093;)<BR>&nbsp;&nbsp;&nbsp; REFERENCES &#091;dbo&#093;.&#091;Languages&#093;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&#091;Id&#093;)<BR>&nbsp;&nbsp;&nbsp; ON DELETE NO ACTION ON UPDATE NO ACTION;<BR>-- Creating non-clustered index for FOREIGN KEY 'FK_LanguageCustomer'<BR>CREATE INDEX &#091;IX_FK_LanguageCustomer&#093;<BR>ON &#091;dbo&#093;.&#091;Customers&#093;<BR>&nbsp;&nbsp;&nbsp; (&#091;Language_Id&#093;);<BR>GO<BR>-- --------------------------------------------------<BR>-- Script has ended<BR>-- --------------------------------------------------</P><P>In my app I do this </P><P>using System;<BR>using System.Windows.Forms;<BR>namespace WindowsFormsApplication1<BR>{<BR>&nbsp;&nbsp;&nbsp; public partial class Form1 : Form<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClassLibrary1.Model1Container manager = <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClassLibrary1.Model1Container.DefaultManager;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Form1()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void button1_Click(object sender, EventArgs e)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClassLibrary1.Language lang = new ClassLibrary1.Language();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang.Name = "Dutch";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lang.EntityAspect.AddToManager();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClassLibrary1.Customer customer = new ClassLibrary1.Customer();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; customer.Name = "Koen";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; customer.Language = lang;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; customer.EntityAspect.AddToManager();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; manager.SaveChanges();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void button2_Click(object sender, EventArgs e)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (var item in manager.Customers)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(item.Language.Name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>}</P><P>I click button 1 and then button 2 and i get a messagebox showing my language name</P><P>i close the app and then the debugger stops at the Langiage getter in the Customer:</P><P>&nbsp;#region Language property</P><P>&nbsp;&nbsp;&nbsp; /// &lt;summary&gt;Gets or sets the Language. &lt;/summary&gt;<BR>&nbsp;&nbsp;&nbsp; &#091;Bindable(false)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;Display(Name="Language", AutoGenerateField=false)&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;DataMember&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;IbEm.RelationProperty("LanguageCustomer", IbEm.QueryDirection.ToRole2)&#093;<BR>&nbsp;&nbsp;&nbsp; public Language Language {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get { return PropertyMetadata.Language.GetValue(this); }<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set { PropertyMetadata.Language.SetValue(this, value); }<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; #endregion Language property<BR>&nbsp;&nbsp;&nbsp; #endregion Navigation properties</P><P>giving this error : Index was outside the bounds of the array.</P><P>Can someone please help us out here, thx</P>]]>
   </description>
   <pubDate>Fri, 17 Sep 2010 10:47:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2168&amp;PID=8546#8546</guid>
  </item> 
 </channel>
</rss>