﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Mon, 06 Dec 2010 09:01:45 GMT</pubDate><dc:creator>jimmyps</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Glad to hear you figured out the problem. Let me know if you found any glitches when integrating it to the UI.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Sun, 05 Dec 2010 19:56:40 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Forget it, I solved the problem. It wan't being  added properly  to the entitymanager.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Sun, 05 Dec 2010 19:48:26 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Cannot get rid of this error no matter what I do. Here is my latest code change.&lt;/p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; AddJob(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; parameter)

&lt;p&gt;{&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; job = JHRepository.CreateJobHistory(member);

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.IsInEditing = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;;

&lt;p&gt;JobHistoryEditor.Open(&lt;/p&gt;
&lt;p&gt;job,&lt;/p&gt;
&lt;p&gt;() =&amp;gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.Jobs.Add(job);

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.SelectedJob = job;

&lt;p&gt;CloseEditSession();&lt;/p&gt;
&lt;p&gt;},&lt;/p&gt;
CloseEditSession); &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;// Cancel &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I commented out all my code in the constructor of ViewModel. I am only displaying a blank view to ensure that nothing in my code is causing the problem. when I execute the above code, it creates the viewModel, and opens the dialog box. At that point I get the error&lt;/p&gt;
&lt;p&gt;"Collection was modified; enumeration operation may not execute."&lt;/p&gt;
&lt;p&gt;"   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()\r\n   at System.Collections.Generic.List`1.Enumerator.MoveNext()\r\n   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()\r\n   at IdeaBlade.Core.EnumerableFns.ForEach[T](IEnumerable`1 items, Action`1 action)\r\n   at IdeaBlade.EntityModel.PendingEntityMap.Update(EntityWrapper pendingWrapper, EntityWrapper realWrapper)\r\n   at IdeaBlade.EntityModel.ScalarEntityReference`1.InformPendingEntityOfRealEntity(EntityWrapper realEntity)\r\n   at IdeaBlade.EntityModel.ScalarEntityReference`1.QueryCallback(EntityQueryOperation op)\r\n   at IdeaBlade.EntityModel.BaseOperation`2.OnCompleted()\r\n   at IdeaBlade.EntityModel.BaseOperation`2.IdeaBlade.EntityModel.IHasAsyncEventArgs.OnCompleted()\r\n   at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;.ctor&amp;gt;b__0(TArgs args)\r\n   at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()\r\n   at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;lt;Execute&amp;gt;b__5(Object x)"&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;/span&gt;&lt;/span&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Thu, 02 Dec 2010 07:49:55 GMT</pubDate><dc:creator>jimmyps</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Bill, sure thing. You can reach me at jimmyps [at] intersoftpt.com.&lt;/p&gt;&lt;p&gt;Thanks,&lt;br /&gt;Jimmy&lt;br /&gt;&lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Wed, 01 Dec 2010 14:18:13 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Jimmy, can I email you directly? I would like to discuss a book project that I am working on involving building LOB apps with Silverlight and using ClientUI and Devforce as the 2 main tools in the book.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Bill&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Wed, 01 Dec 2010 06:28:56 GMT</pubDate><dc:creator>jimmyps</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;I initially didn't see any relations between the UI and the error that you encountered, but thought that you may add an object in the "callback" context, thus I suggest you using the BeginInvoke technique.&lt;/p&gt;&lt;p&gt;Based on your error stack trace, I still didn't see the relation between the dialog box and the "business rules". At a glance, this seems to be a constraint in DF in which a collection shouldn't be modified while it's being enumerated. Generally, your business rules wouldn't affect the Views, and vice versa.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I suggest you to replicate the problem "without" using dialog box/UI and see if you can successfully perform subsequent edits within the callback context. I presume that you should get the same exception here, I would be definitely interested if your results show otherwise.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Wed, 01 Dec 2010 03:29:21 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Nope that didn't make a difference. Since Silverligtht is ideal for LOB apps, this should be a very simple fix. A lot of business rules require that after an object is created it uses a next id of some sort like nextInvoiceNo, nextReceiptNo etc.&lt;/p&gt;
&lt;p&gt;In your devforce-clientui sample, your code calls a create method in the repository which instantiates an object and then passes the object back to the calling routine to be passed to the editor class and displayed. since your code is not calling any asynchronous calls in the repository to create the obejct, it returns quickly and is instantiated before the editor is called.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;in my code, I am doing the same except I am retrieving a next id from a table to populate the key field in the object. I just want to ensure that the object is instantiated before the code modes to invoke the editor. There must be way to prevent the editor from being called until the object is fully instantiated.&lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Wed, 01 Dec 2010 01:36:50 GMT</pubDate><dc:creator>jimmyps</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Bill,&lt;/p&gt;&lt;p&gt;Thank you for providing more information about your scenario,&lt;/p&gt;
&lt;p&gt;Okay, it appears that you're trying to modify the collection of the results passed from the collection in the event raised by DevForce, which is not allowed in this context.&lt;/p&gt;The solution is to call the Open method in the next thread by using CrossPlatform library included in Intersoft Client Framework.&lt;br /&gt;&lt;br /&gt;The code example is as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;CrossPlatform.BeginInvoke(&lt;br /&gt;    new Action(delegate&lt;br /&gt;    {&lt;br /&gt;        // your code here&lt;br /&gt;    }));&lt;/pre&gt;
&lt;p&gt;Let me know if that solves your problem.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Hope this helps,&lt;br /&gt;Jimmy &lt;br /&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Tue, 30 Nov 2010 15:32:51 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;Here is the error that I am getting. It occurs just as the dialogbox is finished being displayed. It likes fine, displays for a few secnods and then the OOB window just turns white and the app ppppppppppppppppppppppppppppppppppppppppppp&lt;/p&gt;
&lt;p&gt;{System.InvalidOperationException: Collection was modified; enumeration operation may not execute&lt;/p&gt;
&lt;p&gt;"   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()\r\n   at System.Collections.Generic.List`1.Enumerator.MoveNext()\r\n   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()\r\n   at IdeaBlade.Core.EnumerableFns.ForEach[T](IEnumerable`1 items, Action`1 action)\r\n   at IdeaBlade.EntityModel.PendingEntityMap.Update(EntityWrapper pendingWrapper, EntityWrapper realWrapper)\r\n   at IdeaBlade.EntityModel.ScalarEntityReference`1.InformPendingEntityOfRealEntity(EntityWrapper realEntity)\r\n   at IdeaBlade.EntityModel.ScalarEntityReference`1.QueryCallback(EntityQueryOperation op)\r\n   at IdeaBlade.EntityModel.BaseOperation`2.OnCompleted()\r\n   at IdeaBlade.EntityModel.BaseOperation`2.IdeaBlade.EntityModel.IHasAsyncEventArgs.OnCompleted()\r\n   at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;.ctor&amp;gt;b__0(TArgs args)\r\n   at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()\r\n   at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;lt;Execute&amp;gt;b__5(Object x)"&lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Tue, 30 Nov 2010 12:11:41 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;The open method is a method in the JobHistoryEditor class. I am using the sample app created between Intersoft and Ideablade as my guide. The open method of the editor class calls the dialogboxserverprovider and gets an instance of it and so forth.&lt;/p&gt;</description></item><item><title>UXDialog Question</title><link>http://www.intersoftsolutions.com/Community/ClientUI/UXDialog-Question/</link><pubDate>Fri, 26 Nov 2010 21:32:23 GMT</pubDate><dc:creator>BillGower</dc:creator><category>ClientUI</category><category>UXDialogBox</category><description>&lt;p&gt;I am developing an app using the ideas presented in the Devforce-ClientUI sample application. From my UXWindow view MemberListView, the user clicks the Edit button to edit an existing member selected in a Grid. On the Member form which is a UXDialog, is a grid listing all the jobs held by the member. The user clicks add to add a new job for the member. The app creates a new job, grabs the next refno # from a table and calls the JobHistoryEditView UXDialog to allow for entry of the new job information. Since this is a Silverlight application, I am doing asynchronous queries. Unfortunately the dialog box is being called and instantiated before the jobhistory object is created is created and the program crashes.&lt;/p&gt;
&lt;p&gt;To ensure that the object is created first and that the dialog box is not being called before I do the following.  I place the code to open the dialog editor immediately after the completed successfully routine. I think that this will ensure that the object is created first before the dialog box is called. Unfortunately the dialog box appears at runtime and then the OOB app gooes white and stops. I have a feeling that the program does not like a dialog box being called from where it is. Is that true? Is there a better way to ensure that the object is created first before the dialog box is called?&lt;/p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; AddJob(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;object&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; parameter)&amp;nbsp; //add button command 

&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;CreateJobHistory(CurrentMember);&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt; &lt;/p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; CreateJobHistory(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;Member&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; member) 

&lt;p&gt;{&lt;/p&gt;
IsBusy = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;; 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; coop = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;Coroutine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.Start(() =&amp;gt; JHRepository.CreateJobHistory(member)); 

&lt;p&gt;coop.Completed &amp;#43;= (sender, args) =&amp;gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (args.CompletedSuccessfully) 

&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;newJob = coop.Result &lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;as&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;JobHistory&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;this&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.IsInEditing = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;strong&gt;;&lt;/strong&gt; 

&lt;p&gt;&lt;strong&gt;JobHistoryEditor.Open(&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;newJob,&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;() =&amp;gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;{ &lt;/strong&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;strong&gt;// Ok callback&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;strong&gt;.Jobs.Add(SelectedJob);&lt;/strong&gt; 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;strong&gt;.SelectedJob = newJob;&lt;/strong&gt; 

&lt;p&gt;&lt;strong&gt;CloseEditSession();&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;},&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CloseEditSession); &lt;/strong&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;strong&gt;// Cancel&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;else &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
IsBusy = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;; 

&lt;p&gt;}&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Here is my repository method&lt;/p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;IEnumerable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;INotifyCompleted&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;gt; CreateJobHistory(&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;Member&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; member) 

&lt;p&gt;{&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; localInfoOp = Manager.LocalInfos.ExecuteAsync(); 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;yield&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; localInfoOp; 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;//Get first LocalInfo.NextJobHistRef and increment by 1 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;LocalInfo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; localInfos = localInfoOp.Results.First&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;LocalInfo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;gt;(); 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; nextRefNo = localInfos.NextJobHistRef; 

&lt;p&gt;localInfos.NextJobHistRef = nextRefNo &amp;#43; 1;&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;Entity&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;gt; changedEntities = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;Entity&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&amp;gt;(); 

&lt;p&gt;changedEntities.Add(localInfos);&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;var&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; saveOp = Manager.SaveChangesAsync(changedEntities); 

&lt;p&gt;saveOp.Completed &amp;#43;= (sender, args) =&amp;gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (args.CompletedSuccessfully) 

&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;else &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #008000; font-size: 13px"&gt;// ////Create a new JobHistory &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;JobHistory&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; newJob = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;JobHistory &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;SocSecNo = member.SocSecNo,&lt;/p&gt;
&lt;p&gt;RefNo = nextRefNo,&lt;/p&gt;
&lt;p&gt;Member = member&lt;/p&gt;
&lt;p&gt;};&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;yield&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;Coroutine&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.Return(newJob); 

&lt;p&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</description></item></channel></rss>