<?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 : SaveChangesAsync(IEnumerable)</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : SaveChangesAsync(IEnumerable)</description>
  <pubDate>Tue, 21 Apr 2026 22:13:17 -700</pubDate>
  <lastBuildDate>Tue, 27 Jul 2010 16:06:14 -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=1948</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>SaveChangesAsync(IEnumerable) : Glad you were able to get that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7833#7833</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> 1948<br /><strong>Posted:</strong> 27-Jul-2010 at 4:06pm<br /><br /><P>Glad you were able to get that working.</P><DIV>We do not have any current audit trail examples, and depending on your requirements, there are a number of implementation choices.&nbsp; One thing you should take a look at is the EntityServerSaveInterceptor.&nbsp; There you can inspect and modify the entities and add auditing information, or even create new entities that can be added to the transaction.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 27 Jul 2010 16:06:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7833#7833</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi ting  Thank you very much...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7817#7817</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 27-Jul-2010 at 8:54am<br /><br />Hi ting<DIV>&nbsp;</DIV><DIV>Thank you very much indeed. Through your help, I have managed to remove entities from both cache and the datagrid. </DIV><DIV>&nbsp;</DIV><DIV>Do you have any sample function or application that manages audit trails in Devforce?</DIV><DIV>&nbsp;</DIV><DIV>Best Regards,</DIV><DIV>Vincent</DIV>]]>
   </description>
   <pubDate>Tue, 27 Jul 2010 08:54:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7817#7817</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi Vincent,   Do you want to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7710#7710</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> 1948<br /><strong>Posted:</strong> 20-Jul-2010 at 7:41pm<br /><br />Hi Vincent,<DIV></DIV><DIV>&nbsp;</DIV><DIV>Do you want to remove entities from showing up in&nbsp;the DataGrid or from the EntityManager's cache?&nbsp; If you want to remove it from the grid, then you should remove it from the ItemsSource list that provides the data for the grid.</DIV><DIV>&nbsp;</DIV><DIV>You can remove it from the EntityManager cache using RemoveEntities (as you do above), and the Entity will be in a detached state until all references to it are gone at which point it should get garbage collected.&nbsp; I really wouldn't be concerned about removing it from cache unless you have hundreds of thousands of entities floating around, though.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 20 Jul 2010 19:41:36 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7710#7710</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi ting  I have been trying...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7671#7671</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 17-Jul-2010 at 8:47am<br /><br />Hi ting<DIV>&nbsp;</DIV><DIV>I have been trying to remove entities from my entity manager without success and there is no any error given out. I have a data grid whereby I add new entities. I want to have a flexibility to remove unwanted entities. Here is my code</DIV><DIV>&nbsp;</DIV><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><P>private</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>void</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> buttonRemove_Click(</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>object</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> sender, </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>RoutedEventArgs</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> e)</P><P>{</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>List</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&lt;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>owner</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&gt; EntityRemove = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>new</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>List</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&lt;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>owner</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&gt;();</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>owner</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> _owner = (</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>owner</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>)MyDataGrid.SelectedItem;</P><P>EntityRemove.Add(_owner);</P><P>mgr.RemoveEntities(EntityRemove);</P><P></P><P>}</P><DIV></DIV><P>Could you please help me here.</P><DIV>&nbsp;</DIV><DIV>Best Regards,</DIV><DIV>Vincent</FONT></FONT></DIV>]]>
   </description>
   <pubDate>Sat, 17 Jul 2010 08:47:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7671#7671</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : ting and Kimj  I truly appreciate...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7661#7661</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 15-Jul-2010 at 11:24pm<br /><br /><DIV>ting and Kimj</DIV><DIV>&nbsp;</DIV><DIV>I truly appreciate your help. </DIV><DIV>&nbsp;</DIV><DIV>I managed to add a reference of my class on the silverlight client side as Kimj instructed me and I used </DIV><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; COLOR: blue; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas">#if</SPAN><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"> !SILVERLIGHT<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p></o:p></SPAN></P><DIV><SPAN style="FONT-SIZE: 9.5pt; COLOR: blue; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">#endif</SPAN><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"> </SPAN></DIV><DIV><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">for those assemblies not supported by silverlight and now everything is working with my custom login manager.</SPAN></DIV><DIV><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Thank you very much indeed gentle men.</SPAN></DIV><DIV><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA"></SPAN>&nbsp;</DIV><DIV><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Best Regards,</SPAN></DIV><DIV><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas; mso-fareast-font-family: 'Times New Roman'; mso-ansi-: EN-US; mso-fareast-: EN-US; mso-bidi-: AR-SA">Vincent</SPAN></DIV>]]>
   </description>
   <pubDate>Thu, 15 Jul 2010 23:24:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7661#7661</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Thank you very much Kimj The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7660#7660</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 15-Jul-2010 at 10:03pm<br /><br /><P>Thank you very much Kimj</P><P>The purpose of choosing to use custom login is to enable me to extend to the existing database which has user particulars and unfortunately the tables there are not set up according to ASP.Net authentication needs. So, in the MyUserBase class, I have added&nbsp;a link to the existing database and it requires the use of&nbsp;assemblies related to data access.</P><DIV></DIV>Unfortunately silverlight does not support use of data access assemblies like System.Data. How can I add a reference to client silverlight without running to trouble of those assemblies and yet be able to access my existing database?<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Best Regards,</DIV><DIV>Vincent</DIV>]]>
   </description>
   <pubDate>Thu, 15 Jul 2010 22:03:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7660#7660</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : The MyUserIdentity and MyUserBase...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7658#7658</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 15-Jul-2010 at 7:55pm<br /><br />The MyUserIdentity and MyUserBase classes must also be defined on both client and server.&nbsp; The error seems to indicate that the Silverlight application doesn't know about the MyUserBase class.&nbsp;&nbsp; You've probably defined these custom classes in the web application project, but you also need to link the files containing these classes&nbsp;into your Silverlight application project. <DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Also, there's no need to define custom types here, unless you do later plan to add your own properties or logic.&nbsp; You can use UserBase and UserIdentity as is if they meet your needs.</DIV><span style="font-size:10px"><br /><br />Edited by kimj - 15-Jul-2010 at 7:57pm</span>]]>
   </description>
   <pubDate>Thu, 15 Jul 2010 19:55:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7658#7658</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Thank you ting  I have tried...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7657#7657</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 15-Jul-2010 at 7:10pm<br /><br />Thank you ting<DIV>&nbsp;</DIV><DIV>I have tried to implement user identity as shown below but I am still getting the same error.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; UserIdentity identity = new MyUserIdentity(mUserName, "Custom", true);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;UserBase userbs = new MyUserbase(identity, GetRoles(mUserName));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;return userbs;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>The UserIdentity implementation is as follows</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; &#091;DataContract&#093;<BR>&nbsp;&nbsp;&nbsp; &#091;DiscoverableType(DiscoverableTypeMode.KnownType)&#093; <BR>&nbsp;&nbsp;&nbsp; public class MyUserIdentity : UserIdentity<BR>&nbsp;&nbsp;&nbsp; {</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public MyUserIdentity(string Name, string type, bool isAuthenticated)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : base(Name, type, isAuthenticated)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Best regards,</DIV><DIV>Vincent</DIV>]]>
   </description>
   <pubDate>Thu, 15 Jul 2010 19:10:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7657#7657</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Instead of using AppIdentity,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7656#7656</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> 1948<br /><strong>Posted:</strong> 15-Jul-2010 at 6:20pm<br /><br /><P>Instead of using AppIdentity, use UserIdentity.&nbsp; We are updating our samples to reflect this.</P>]]>
   </description>
   <pubDate>Thu, 15 Jul 2010 18:20:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7656#7656</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi ting  I tried to follow the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7637#7637</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 15-Jul-2010 at 12:56am<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Hi ting</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>I tried to follow the steps to told me but still I am getting an error as show below.</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter </FONT><a href="http://idealblade.com/EntityModel:LoginResult" target="_blank"><U><FONT face="Times New Roman" size=3>http://idealblade.com/EntityModel:LoginResult</FONT></U></A><FONT face="Times New Roman" size=3>. The InnerException message was ‘Element ’ </FONT><a href="http://idealblade.com/EntityModel:Principal" target="_blank"><U><FONT face="Times New Roman" size=3>http://idealblade.com/EntityModel:Principal</FONT></U></A><FONT face="Times New Roman" size=3>’ contains data of the ‘http://schema.datacontract.org/2004/07/DevCombobox:MyUserbase’ data contact. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to ‘MyUserbase’ to the list of known types for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer. Please see InnerException for more details.</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Here is my <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>implementation of IEntityLoginManager</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; COLOR: blue; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas">public</SPAN><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: #2b91af">LoginManager</SPAN> : IEntityLoginManager<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>&#091;<SPAN style="COLOR: #2b91af">DebuggerNonUserCode</SPAN>&#093;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: #2b91af">IPrincipal</SPAN> Login(ILoginCredential pCredential, IdeaBlade.EntityModel.EntityManager pEntityManager)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> mUserName = <SPAN style="COLOR: blue">string</SPAN>.Empty;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> mPassword = <SPAN style="COLOR: blue">string</SPAN>.Empty;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">if</SPAN> (pCredential == <SPAN style="COLOR: blue">null</SPAN>)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>mUserName = <SPAN style="COLOR: #a31515">"admin"</SPAN>;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>mPassword = <SPAN style="COLOR: #a31515">"12345678"</SPAN>;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else</SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>mUserName = pCredential.UserName;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>mPassword = pCredential.Password;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>testEntities mManager = <SPAN style="COLOR: blue">new</SPAN> testEntities(pEntityManager);<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>VerifyCredentials(mUserName, mPassword);<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">Int64</SPAN> user_id = 1;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">IIdentity</SPAN> identity = <SPAN style="COLOR: blue">new</SPAN> AppIdentity(mUserName, user_id, mPassword);<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>UserBase userbs = <SPAN style="COLOR: blue">new</SPAN> MyUserbase(identity, GetRoles(mUserName));<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> userbs;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Here is my implementation of UserBase</FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&#091;DataContract&#093;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&#091;DiscoverableType(DiscoverableTypeMode.KnownType)&#093;<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: #2b91af">MyUserbase</SPAN> : UserBase<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> MyUserbase(<SPAN style="COLOR: #2b91af">IIdentity</SPAN> identity, <SPAN style="COLOR: #2b91af">IList</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>&gt; roles)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>: <SPAN style="COLOR: blue">base</SPAN>(identity, roles)<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 9.5pt; FONT-FAMILY: C&#111;nsolas; mso-bidi-font-family: C&#111;nsolas"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3></FONT></o:p>&nbsp;</P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>Best Regards</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>Vincent.</FONT></o:p></P>]]>
   </description>
   <pubDate>Thu, 15 Jul 2010 00:56:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7637#7637</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi Vincent,   GenericPrincipal...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7586#7586</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> 1948<br /><strong>Posted:</strong> 09-Jul-2010 at 5:07pm<br /><br />Hi Vincent, <DIV>&nbsp;</DIV><DIV>GenericPrincipal is not a native type in Silverlight so that's why it is&nbsp;having serialziation problems.&nbsp; You can return a DevForce UserBase, or any IPrincipal that can be serialized.&nbsp; To make a type serializable, you should</DIV><OL><LI>Have the class "implement" the IKnownType interface.&nbsp; (This is a marker interface, so no actual implementation is required.)</LI><LI>Mark the class with the &#091;DataContract&#093; attribute</LI><LI>Mark each serializable property with the &#091;DataMember&#093; attribute.</LI></OL><P>&nbsp;</P>]]>
   </description>
   <pubDate>Fri, 09 Jul 2010 17:07:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7586#7586</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi ting  Thank you very much...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7575#7575</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 08-Jul-2010 at 9:19pm<br /><br />Hi ting<DIV>&nbsp;</DIV><DIV>Thank you very much indeed. It has worked and I have learned where I was making mistake. </DIV><DIV>&nbsp;</DIV><DIV>Would you please bear with me as I have something else to ask you.</DIV><DIV>&nbsp;</DIV><DIV>I have been trying to implement my own custom <FONT face=C&#111;nsolas color=#2b91af><FONT face=C&#111;nsolas color=#2b91af><FONT face=C&#111;nsolas color=#2b91af><FONT size=2>IEntityLoginManager <FONT color=#000000>but I&nbsp;am continously getting serialization error. </FONT><FONT color=#000000>Here are the functions that invoke the class</FONT></FONT></FONT></FONT></FONT></DIV><DIV><FONT face=C&#111;nsolas color=#2b91af><FONT face=C&#111;nsolas color=#2b91af><FONT face=C&#111;nsolas color=#2b91af><FONT size=2><FONT color=#2b91af></FONT></FONT></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT face=C&#111;nsolas color=#2b91af><FONT face=C&#111;nsolas color=#2b91af><FONT face=C&#111;nsolas color=#2b91af><FONT size=2><FONT color=#2b91af><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IIdentity</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> <FONT color=#000000>identity</FONT> = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>new</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>AppIdentity</FONT></FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas color=#000000 size=2>(mUserName, user_id, mPassword);</FONT></FONT></FONT></FONT></FONT></FONT></DIV><DIV><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P>principal = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>new</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MyGenericPrincipal</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>(identity, GetRoles(mUserName));</P></FONT></FONT></DIV><DIV><FONT face=C&#111;nsolas size=2></FONT>&nbsp;</DIV><DIV><FONT face=C&#111;nsolas size=2>Below is my class implementing <FONT color=#2b91af>IPrincipal.</FONT></FONT></DIV><DIV><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P>&#091;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>DataContract</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#093;</P><P>&#091;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>DiscoverableType</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>(</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>DiscoverableTypeMode</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>.KnownType)&#093;</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>class</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MyGenericPrincipal</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> : </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IPrincipal</P></FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P>{</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>private</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#091;&#093; _roles = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>null</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>;</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>private</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IIdentity</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> _identity = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>null</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>;</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> MyGenericPrincipal(</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IIdentity</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> identity, </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#091;&#093; roles)</P><P>{</P><P>_roles = roles;</P><P>_identity = identity;</P><P></P><P>}</P><P></P><P>&#091;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>DataMember</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#093;</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IIdentity</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> Identity </P><P>{ </P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>get</P></FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P>{</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>return</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> _identity;</P><P>}</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>set</P></FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P>{</P><P>_identity = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>value</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>;</P><P>} </P><P>}</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>bool</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> IsInRole(</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> role)</P><P>{</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>bool</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> found = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>true</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>;</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>return</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> found;</P><P></P><P>}</P><P></P><P>&nbsp;</P><P>}</P></FONT></FONT></DIV><DIV><FONT face=C&#111;nsolas size=2></FONT>&nbsp;</DIV><DIV><FONT face=C&#111;nsolas size=2>Thank you ting</FONT></DIV><DIV><FONT face=C&#111;nsolas size=2></FONT>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 08 Jul 2010 21:19:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7575#7575</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi Vincent,  I started withthe...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7573#7573</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> 1948<br /><strong>Posted:</strong> 08-Jul-2010 at 7:44pm<br /><br /><DIV>Hi Vincent,</DIV><DIV>&nbsp;</DIV><DIV>I started with&nbsp;the DevForce Silverlight Template, mapped a few Entities from NorthwindIB, and added the code below.&nbsp; It runs with no problems, and our unit tests are passing as well.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; public partial class MainPage : UserControl {<BR>&nbsp;&nbsp;&nbsp; public MainPage() {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.Loaded +=new RoutedEventHandler(MainPage_Loaded);<BR>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; void MainPage_Loaded(object sender, RoutedEventArgs e) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var entityManager = new NorthwindIBEntities();</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Employee newEmployee = entityManager.CreateEntity&lt;Employee&gt;();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newEmployee.FirstName = "Richard";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newEmployee.LastName = "Feynman";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newEmployee.EntityAspect.AddToManager();</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List&lt;Employee&gt; list = new List&lt;Employee&gt;();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list.Add(newEmployee);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var op = entityManager.SaveChangesAsync(list);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; op.Completed += new EventHandler&lt;EntitySavedEventArgs&gt;(op_Completed);<BR>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; void op_Completed(object sender, EntitySavedEventArgs e) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (e.HasError) MessageBox.Show("Save Failed: " + e.Exception.Message);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else MessageBox.Show("Save Successful");<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; }</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 08 Jul 2010 19:44:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7573#7573</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) :  Thank you ting.  In fact I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7561#7561</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 07-Jul-2010 at 9:24pm<br /><br /><DIV></DIV><P>Thank you ting. </P><P>In fact I did not show the upper part of my code but It is there as shown below</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myObj bill = null;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bill = manager.CreateEntity&lt;myObj&gt;();&nbsp;&nbsp;&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; bill.EntryDate = DateTime.Now;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bill.ID = "Admin";</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bill.EntityAspect.AddToManager();</P><DIV>If I use SaveChangesAsync() it works fine. But If I use SaveChangesAsync(IEnumerable) it does not return any error and it does not insert the&nbsp;record into the database.</DIV><DIV>&nbsp;</DIV><DIV>Could you please give me a sample of a working SaveChangesAsync(IEnumerable)</DIV><DIV>&nbsp;</DIV><DIV>Thank you</DIV>]]>
   </description>
   <pubDate>Wed, 07 Jul 2010 21:24:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7561#7561</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : After you create a new entity...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7560#7560</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> 1948<br /><strong>Posted:</strong> 07-Jul-2010 at 8:09pm<br /><br /><DIV>After you create a new entity you need to add it to the manager using EntityManager.AddEntity().</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 07 Jul 2010 20:09:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7560#7560</guid>
  </item> 
  <item>
   <title>SaveChangesAsync(IEnumerable) : Hi everybody  Can anyone help...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7543#7543</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=791" rel="nofollow">Vincent</a><br /><strong>Subject:</strong> 1948<br /><strong>Posted:</strong> 07-Jul-2010 at 5:56am<br /><br />Hi everybody<DIV>&nbsp;</DIV><DIV>Can anyone help me here. I am trying to use SaveChangesAsync(IEnumerable) to persist my entities into the database&nbsp;and every time I click save everything goes without error, but there is no entity inserted into the database. If I use SaveChangesAsync(), everything goes successifully. Here is the code I am using</DIV><DIV>&nbsp;</DIV><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>if</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> (EM.HasChanges())</P><P>{</P><P></P><P>ClassArray = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>new</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MyEntities</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#091;1&#093;;</P><P>ClassArray&#091;0&#093; = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>new</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MyEntities</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>(</FONT></FONT><FONT face=C&#111;nsolas color=#a31515 size=2><FONT face=C&#111;nsolas color=#a31515 size=2><FONT face=C&#111;nsolas color=#a31515 size=2>"Entity1"</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>);</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>TestClass</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> test = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>new</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>TestClass</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>(</FONT></FONT><FONT face=C&#111;nsolas color=#a31515 size=2><FONT face=C&#111;nsolas color=#a31515 size=2><FONT face=C&#111;nsolas color=#a31515 size=2>"Entity1"</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>);</P><DIV><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P></FONT></FONT><FONT face=C&#111;nsolas color=#008000 size=2><FONT face=C&#111;nsolas color=#008000 size=2><FONT face=C&#111;nsolas color=#008000 size=2>//var op = mgr.SaveChangesAsync(test);</P></FONT></FONT></FONT></DIV><DIV><P></P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>var</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> op = EM.SaveChangesAsync(ClassArray);</DIV><DIV><P></P>op.Completed += (s, args) =&gt;{</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>if</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> (</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>null</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> == args.Error){}</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>else</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>{</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MessageBox</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>.Show(args.Error.Message, </FONT></FONT><FONT face=C&#111;nsolas color=#a31515 size=2><FONT face=C&#111;nsolas color=#a31515 size=2><FONT face=C&#111;nsolas color=#a31515 size=2>"Error"</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>, </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MessageBoxButton</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>.OKCancel);}</DIV><P>};</P><P>}</P><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Below,&nbsp;are the classes <FONT color=#2b91af>MyEntities</FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> and <FONT color=#2b91af>TestClass.&nbsp;</FONT><FONT color=#000000>I tried to use each of the class below but non has worked.</FONT></FONT></FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&nbsp;</DIV><DIV></FONT></FONT></FONT></FONT><DIV></DIV><DIV></DIV><DIV></DIV><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&nbsp;&#091;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>DataContract</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#093;</DIV><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>class</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>MyEntities</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </P><P>{</P><P>&#091;</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>DataMember</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>&#093;</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> _SavedEntities;</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> MyEntities()</P><P>{</P><P>}</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> MyEntities(</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> SavedEntities)</P><P>{</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>this</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>._SavedEntities = SavedEntities; </P><P>}</P><P>}</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>class</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>TestClass</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> : System.Collections.</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IEnumerable</P></FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2><P>{</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> _Entity = </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2>.Empty;</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> TestClass(</FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>string</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> entity)</P><P>{</P><P>_Entity = entity;</P><P>}</P><P></P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>public</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> System.Collections.</FONT></FONT><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2><FONT face=C&#111;nsolas color=#2b91af size=2>IEnumerator</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> GetEnumerator()</P><P>{</P><P></FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>yield</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> </FONT></FONT><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2><FONT face=C&#111;nsolas color=#0000ff size=2>return</FONT></FONT></FONT><FONT face=C&#111;nsolas size=2><FONT face=C&#111;nsolas size=2> _Entity;</P><P></P><P>}</P><P>}</P></FONT></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Wed, 07 Jul 2010 05:56:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1948&amp;PID=7543#7543</guid>
  </item> 
 </channel>
</rss>