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

  • SEARCH
  • Home
  • 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 8765221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:13:40+00:00 2026-06-13T16:13:40+00:00

I am working on a SOA Architecture. So I donot have access to database.

  • 0

I am working on a SOA Architecture. So I donot have access to database. I use DTO’s on the server as entities.I fill in an entity on the client and submit it to the server and that is when a primary key is generated for the entity.

And I use (client Side)

_customerDomainContext.SubmitChanges(SubmitChangesCallback, null);

In the callback when I try to access the newly added enity, I only can see the properties which I filled in.

I have access to the submited entity on the domain Service(server Side) as show below.

   [Insert]
    public void InsertCustomerDTO(CustomerDTO customer)
    {
      CustomerDTO customerFromDB = CreateCustomerDTOCore(customer);
    }

Is there a way I get the newly generated Entity to the client so that I can access the entity’s newly generated Key on SubmitChanges.

Any Suggestion is kindly appreciated.

  • 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-06-13T16:13:42+00:00Added an answer on June 13, 2026 at 4:13 pm

    Simply use the argument of the callback:

    context.SubmitChanges(x =>
                {
                    //Contains your entities fulfilled by the server
                    x.ChangeSet
                }, null);
    

    It contains the entities RETURNED by the server after thy have been saved, so in your key field you’ll find the actual key value.
    In order for the above process to run, may not be obvious that you need to “edit” your entities.

    [Insert]
    public void InsertJeopardyModel(CustomerDTO jeopardy)
    {
        CustomerDTO customerFromDB = CreateCustomerDTOCore(customer);
        jeopardy.Id = customerFromDB.Id;
        jeopardy.MyProperty = customerFromDB.MyDBEquivalentProperty;
    }
    

    As you can see in the edited sample I’m actually editing the CustomerDTO object, just like Enitity Framework or LINQ2SQL does.
    That edited entity will then be serialized to the client that will expose it in the Changeset property.

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

Sidebar

Related Questions

I'm working on the initial architecture for a solution for which an SOA approach
I have been working on a mysql database that I set up with phpmyadmin...
I'm working with Symfony2. I have an entity Employee and an entity Message related
In our SOA application we have several customers' data in the same database and
Working with Reporting Services 2008 r2. So here's my issue: We have 5 reports
Working with MS Access for the first time and coming across a few problems
Working on a project using Entity Framework (4.3.1.0). I'm trying to figure out how
We are working on a SOA Project consisting of multiple web services. Each web
I'm currently working on a database-heavy, line-of-business Rails application for insurance brokers that is
I am trying to write my first SOA client, and am having difficulties with

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.