How to create ViewModel in an MVVM application using entity framework where database has many-to-many relationship?

I have started developing a small application in WPF. Since I am completely new to it, to start with I took a microsoft's sample available at
Microsoft Sample Application and following the pattern of the sampke I have been so far successful  in creating four different views for their corresponding
master tables. Unfortunately, I have got stuck up as the sample does not contain pattern for creating ViewModel when there is a many-to-many relationship in the database. In my application, I have the following data structure:
1. Table Advocate(advId, Name)
2. Table Party (partyId, Name)
3 Table Case (caseId, CaseNo)
4. Link Table Petitioner (CaseId, PartyId)
5. Link Table Respondent (CaseId, PartyId)
6. Link Table EngagedAdvocate(CaseId, advId)
7. Link Table EngagedSrAdvocate(CaseId, advId)
In the scenario above, I am a bit confused about how to go forward creating the required ViewModel which would render me to have multiple instances of Petitioners, Respondents, Advocates and SrAdvocates.
Please explain details in step by step manner considering that whatever work I have completed so far is a replica of Microsoft's sample referred above. I would also like to mention that I have developed my application
using VB.net. So please provide solution in vb.net.
After getting many-to-many relationship introduced into my application, it would achieve one level above the sample application and I would like to share with the community so that it could be helpful to many aspiring developers seeking help with MVVM.

Hi ArunKhatri,
I would suggest you referring to Magnus's article, it provides an example of how you could display and let the user edit many-to-many relational data from the Entity Framework in a dynamic and data-bound DataGrid control in WPF:
http://social.technet.microsoft.com/wiki/contents/articles/20719.wpf-displaying-and-editing-many-to-many-relational-data-in-a-datagrid.aspx
You can learn how to design the ViewModel and the relationship between the entities.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to create the user on Internet Application Server(IAS) control console

    Hi All,
    My Client is asking me for How to create the user on Internet Application Server(IAS) control console 10.1.2( 10g release 2).
    If anyone have the document for How to Create the User on Internet Application Server (IAS) console 10g release 2 , then please send me the document and help me out from this Concern.
    Regards,
    Yadav@intelli.
    Edited by: 851080 on Apr 8, 2011 6:31 PM

    Are you using OID? Can you provide more details about your iAS environment?

  • How to create a account key for application type M ?

    Hi Guys,
    How to create a account key for application type M ? and link the same with
    Gl account.
    thanks.

    Hi
    Please create the account keys or transaction keys in
    SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
    Thanks & Regards
    Kishore

  • How to Create Listbox in a JSP Application

    Hi.
    I'm new to JDeveloper. Can someone show me how to create a Listbox (that gets it's values from a database table) in a *.jsp form? This listbox is linked to a database table field. I'm not using BC4J nor EJB. I've created a JSP application with ADF using a Model1 (or MVC pattern) architecture -- which I based on the JDeveloper10i tutorial (http://otn.oracle.com/obe/obe9051jdev/ADFmodel1/ADFmodel1.htm). I've tried using render on the field in the view object entity, refresh the Data Control Palette and then drag the table view entity to a *.jsp page as input form. But I can't see the field in the form being displayed as a list box.
    Please help.
    thanks,
    christina

    Hi Shay.
    Thanks for the quick reply. Sorry for the misuderstanding but I have no clue on terminology used in JDeveloper. The "view object" entity I was referring to is the "<TableName>View" view object (e.g. EmpView) under the Model->Application Sources->Mypackage folder where the "<TableName>" entity object file also resides. I think I'm using the Business Component bec. I have this step in the tutorial that I based my application on.
    I have trouble following the tutorial link you gave me (for the ADF Business Component Popup list) bec. when I select the table field in the "Data Control Palette" Panel, the only values I see in the "Drag and Drop As" poplist are "Value","Label","RenderValue" and "Input Render". I can't see the type "Single Select List". Do you why is that?
    thanks,
    christina

  • How to create an export of APEX application with DB?

    How to create the common script of Application an Data Base?
    What is the best way to make an update of my application on host machine, if I develope my application in personal one?
    Regards, Kostya

    Thanx for your reply's
    If I understand the tutorial correctly I should do
    something like this to start the map:
    Map<String, myClass> myMAP = new HashMap<String,
    MyClass>();
    and something like this to add a new instance of the
    class every time:
    myMAP.put(myString, new myClass());
    So this would result a link between the Strings and
    the instance of the Class?
    Thanks
    Message was edited by:
    JasperLevinkyep. the String is the key, and the MyClass instance is the value. to get the value out of the map, use map.get(key)

  • How to create a file under web application root from java program

    how to create a file under web application root from java program like an action class?

    like an action class?Huh? What exactly is your requirement?
    Creating a file is usually done with java.io API. Read the java.io tutorials how to play with files.

  • How to create installation scripts in packaged application

    can u tel me How to create installation scripts for packaged application.
    also tell me , i have to first install scripts and then supporting objects or
    supporting objects first then installation scripts..

    Hi,
    Depending upon your usecase there are different ways to implement this logic.
    Check this for example (Read my answer in this post):
    https://forums.sdn.sap.com/thread.jspa?threadID=349151
    Also check these senarios:
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm
    Also the delegation may be interesting for you:
    http://help.sap.com/saphelp_nw70/helpdata/en/a0/44b742cafec96ae10000000a155106/frameset.htm
    Greetings,
    Praveen Gudapati

  • Hi all, May i know how to create filters in Hyperion Planning Application?

    Hi all, May i know how to create filters in Hyperion Planning Application?
    i don't know how to create filters in Planning Application. but my superior asking me to create filters.
    Thanks & Regards,
    Sekhar

    Go to Administration > Dimensions > Select Dimension > Select the member to want to assign acccess filters to :- Assign Access
    Repeat process for all access permissions.
    If there is a lot of permissions to set you could use a utility :-http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/ch03s07.html
    Refresh Planning including security filters
    Also have a read of :- http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/mg_secfilter.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to create and delete an Endeca application in Windows

    HI,
    can you please help me in ,
    how to create and delete an Endeca application inWindows machine not in Linux Machine.
    Thanks.....

    Hi,
    Steps to create an Endeca Application are clearly given in Getting Started Guide.
    http://docs.oracle.com/cd/E38680_01/Common.311/pdf/GettingStarted.pdf (Chapter 6 : Deploying a Reference Application)
    If you want to create an endeca application so as to integrate with Product Catalog system such as ATG using ATG 10.1.1 or above , then create an endeca application using the discover-data-catalog-integration reference application. Steps for doing this are documented in ProductCatalogDTGuide
    http://docs.oracle.com/cd/E38679_01/ToolsAndFrameworks.311/pdf/ProductCatalogDTGuide.pdf (Deploying the Product Catalog Application)
    To delete an Endeca Application that you have created in Windows/linux
    1. Navigate to the control directory of the application that you want to remove and execute the script
    runCommand.bat --remove-app (Removes the provisioning information with EAC admin console)
    2. Remove the instance configuration files for the application using the emgr_update command line utility
    emgr_update.bat host localhost:8006 app_name My_app action remove_all_settings prefix My_prefix
    3. You can then explicitly delete the directory in the Endeca_apps directory where you have initially created your application.
    If you are using discover-data-catalog-integration, you can remove the CAS Record Store Instances by navigating to CAS/bin directory and executing
    ./component-manager-cmd.sh delete-component -n {YOUR_APP_RECORD_STORE_NAME}
    Thanks,
    Shabari

  • How to build ear files for ADF application using Ant task

    How to build ear files for ADF applications using Ant. The ojdeploy ant task can not find application-level deployment profiles. I am trying to automated build and release for ADF application.
    Any help is highly appreciated.
    Thanks
    Shiva

    Hi Timo
    Thanks for your reply.
    I have successfully created ear file using ojdeploy on jenkins. however when am trying to auto deploy using WLDeploy ant task am getting the following
    error :
    weblogic.application.ModuleException: :oracle.mds.config.MDSConfigurationException:MDS-01335: namespace "/oracle/webcenter/quicklinks/scopedMD" mapped to metadata-store-usage "WebCenterFileMetadataStore" but its definition was not found in MDS configuration
    Please advise how to handle this.
    As am a newbie to ADF, could you please advise if it is possible for the ADF application deployments can be automated for different environments using jenkins due to this MDS dependencies.
    Appreciate your help.
    Thanks
    Shiva

  • How to create a variance on data that exists iIn only one database column

    How to create a variance on data that exists iIn only one database column?
    I'm trying to create a calculation to show the difference between the budgets for two different years in a Discoverer crosstab query.
    I'm using the lag function to repeat the value of a column for the current year and the year before.

    Lag and lead seems to be the only choice and they work excellent. Checkout the new 10g Database features. There is new SQL modal clause which might give additional and powerful analytics but in this case lag and lead should be sufficient.
    regards
    http://www.infocaptor.com/workbook-dump.php

  • How to create a muli line text area using JavaFx

    Hi all,
    Since the preview SDK does not contain TextArea any more, I am wondering how to create a muli line text area using JavaFX. The behaviour of this text area/field should be somehow similar to JTextArea in Swing or StyledTextWidget in SWT.
    Does JavaFX have any support for this? What would be a sensible approach to create such a widget?
    Thanks for your suggestions,
    br michael

    This is a pretty old thread (I know I came across this while searching for something similar recently), but I figured I'd throw this out there in case other people might find this useful. As I write this, JavaFX's latest version is 1.3... which may have added the needed functionality since the last post.
    You can now create a multi-line text area using a TextBox and by specifying the nubmer of lines and setting the "multiline" value to true. It may not offer all of the same functionality as JTextArea, but it did the job for what I needed... newlines by pressing enter, scrollbar if text surpasses height, etc.
    Here's a simple example:
    Group {
       content: [
          TextBox {
             text: "This is a multi-line textbox"
             lines: 10  // <-- this may/may not be necessary depending on your situation. Default is 5.
             multiline: true
    }Edited by: loeschg on Jul 29, 2010 2:59 PM

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production?

    How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production? I dont have a .abf file available. Two paritions in production are missing data. We were able to get back file system backup which contains the files for these two paritions.
    How do I create a cube in Dev using this file system backup.
    we are on SQL Server 2008R2.
    Thanks,

    How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production? I dont have a .abf file available. Two paritions in production are missing data. We were able to get back file system backup which contains the files for these two paritions.
    How do I create a cube in Dev using this file system backup.
    we are on SQL Server 2008R2.
    Thanks,

  • How to create Billing Plan in sales order using Function module /BAPI

    hi,
    How to create Billing Plan in sales order using Function module /BAPI
    i hv check few FM such
    BILLING_SCHEDULE_READ
    BILLING_SCHEDULE_GET_NUMBER
    BILLING_SCHEDULE_SAVE
    But unable to create billing plan for a sales order.....any other method to create???

    Hi,
    Use this link.
    Create sales order with billing plan via LSMW and BAPI BUS2032
    BAPI or Function to update Billing Plan in Sales Order Items
    Hope this will help you.
    Regards,
    Vijay

Maybe you are looking for

  • Authorization Error while extracting data after applying SAP upgrade patch

    Hello All, Recently we have updated the SAP BW patch to 24 and ECC patch to 22. I have the access to perform extraction in RSA3 tcode in ECC. However, While performing the data load in BW, the process is failing at the Infopackage step with the follo

  • IPhone 4 not recognized by computer

    I've been syncing w/ this notebook PC computer (running Windows 7) for 2 months w/o problem. Today, I connected to the same USB port and nothing -- it didn't recognize the phone, nor did it start charging it. I've restarted my notebook, rebooted the

  • 2 monitor bug

    when running dreamweaver CC with a second monitor there is a bug with the color picker window in css properties. it does not open! any experiences? solutions? regards, jo jacobs

  • Optimum Size for Web Gallery

    In trying to set up galleries that have quick view time, I'm trying to follow iPhoto advise and use a Medium sized photo for Web Galleries. iPhoto help sez:+When you send, print, or publish a photo from your iPhoto library, you need to choose the rig

  • Deleted Quicktime  from my Intel iMAC and I need it back!!

    I thought that I had an issue with Quicktime Pro. So, I deleted it from my iMac running 0S 10.4, thinking that I could download and re-install a clean copy of the program. NOT. I downloaded the "Quicktime version for All Quicktime 7 users" and when I