Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6116747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:14:31+00:00 2026-05-23T15:14:31+00:00

So I dynamically and programatically set separate datacontexts for different screens in my SL

  • 0

So I dynamically and programatically set separate datacontexts for different screens in my SL app. I did this because there was data that needed to be displayed in one screen, coming from different Database tables.

My challenge is this: After querying personal information and next of kin information (different tables), I need to submit all updates made on the screen to the respective tables.

I wrote a custom query getting the data via Ego loading (LINQ), but How do I sbumit the changes made, after I set the datacontext of the screen already?

Here is the query code

        public PersonalInfoModel GetPersonalInfo(string email)
    {
        var PersonalInfo = (from p in DataContext.OFFLINEAPPLICANTs
                            where p.EMAIL_ADDRESS == email
                            select new PersonalInfoModel
                            {
                                AppEmail = p.EMAIL_ADDRESS,
                                FirstName = p.FIRSTNAME,
                                LastName = p.LASTNAME,
                                MiddleName = p.MIDDLENAME,
                                Denomination = p.RELIGIOUSAFF,
                                DateOfBirth = p.DOB,
                                AppliedDate = p.CREATEDDATE.Value,
                                Gender = p.GENDER,
                                TrnOrSsn = p.SSN_TRN,
                                Nis = p.NIS,
                                NationalCountry = p.Country.Country1,
                                NokEmail = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                    .Select(q => q.email).FirstOrDefault(),
                                NokFax = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                    .Select(q => q.fax).FirstOrDefault(),
                                NokFirstName = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                .Select(q => q.first_name).FirstOrDefault(),
                                NokLastName = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                    .Select(q => q.last_name).FirstOrDefault(),
                                NokPhone1 = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                .Select(q => q.tel1).FirstOrDefault(),
                                NokPhone2 = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                    .Select(q => q.tel2).FirstOrDefault(),
                                NokRelationship = p.NEXT_OF_KINs.Where(q => q.email_address == p.EMAIL_ADDRESS)
                                  .Select(q => q.relationship_id).FirstOrDefault(),
                            }).FirstOrDefault();
        return PersonalInfo;
    }

and after loading the data, from a parent SL control, I set the View’s datacontext to the data returns from that query.

How do I submit the changes, or go about doing so?

I am using RIA Services btw

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:14:31+00:00Added an answer on May 23, 2026 at 3:14 pm

    Well I came to the realization that it cannot be done that way. I instead, had to recall the original tables housing the respective data and update the fields accordingly and submit the changes to the context.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building an app that needs to dynamically/programatically know of and use different
Say i have this function that dynamically creates my namespace for me when I
My Cocoa app needs some small dynamically generated windows. How can I programmatically create
How would you dynamically subscribe to a C# event so that given a Object
I am trying to add controls to a UserControl dynamically (programatically). I get a
Is there a way to set the value of a file input ( <input
Can someone tell me how to set a:visited and a:hover programmatically? I am dynamically
I need to dynamically set the contents within the template of a DataGrid based
I dynamically create gridview, and in this grid I have template field also field.HeaderTemplate
I'm dynamically loading a file that will indicate when to show certain words at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.