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 6334557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:40:58+00:00 2026-05-24T18:40:58+00:00

I have server and client database where I need to keep some of the

  • 0

I have server and client database where I need to keep some of the server data in sync with client dataabse. Database schema is same apart from having IDENTITY(1,1) on server.

Data can be created on server only. It has to be inserted on client with using server’s id.

CREATE TABLE [MyServer].[dbo].[Test1](
[Test1Id] [int] IDENTITY(1,1) NOT NULL,
[Test1Value] [datetime] NOT NULL,
CONSTRAINT [PK_Test1] PRIMARY KEY CLUSTERED ( [Test1Id] ASC ) ) ON [PRIMARY]

CREATE TABLE [MyClient].[dbo].[Test1](
[Test1Id] [int] NOT NULL,
[Test1Value] [datetime] NOT NULL,
CONSTRAINT [PK_Test1] PRIMARY KEY CLUSTERED ( [Test1Id] ASC ) ) ON [PRIMARY]

Is there any way to change StoreGeneratedPattern for entity classes without rebuilding assembly so I can insert IDENTITY on client side? I spent some time looking into

EntityModelCodeGenerator

but without any success.

Of course I run server and client in different app domain so I can do this change on startup.

I am using default EntityFramework classes. I can change to POCO entities if it resolves my problem. Classes are simple and referenced by id’s instead of NavigationProperties.

Thanks

  • 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-24T18:40:59+00:00Added an answer on May 24, 2026 at 6:40 pm

    My final solution is to remove StoreGeneratedPattern=”Identity” on both sides (Client/Server) and generate object Id in a code before inserting into DB. This way my code can stay client/server agnostic and only creates ID for default value.

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

Sidebar

Related Questions

Need to create a client server application, both have to communicate with Database. Which
I have a classic client/server (fat client and database) program written in Delphi 2006.
We have client server based app which saves user related data into a zip
I have Client-Server environment and developed a project for Client-Server. I need to share
I have a Client/Server application, where the Client and Server have some common tables
I have a web based CRM system that stores all the client data from
I have a subversion server for a client which uses a MySQL database to
I have a Java application with server and Swing client. Now I need to
I have a client-server Silverlight application, which is use Socets. I have server appliaction
i have a server - client application that runs on java 1.3; i want

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.