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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:07:36+00:00 2026-06-08T08:07:36+00:00

Let me explain the title. I’m using Entity Framework Code First in an application

  • 0

Let me explain the title.

I’m using Entity Framework Code First in an application (TestApp).
For debugging purposes the TestApp connects to an SQLExpress database (central database server).

To keep things simple here, the database contains one table “Products” and the TestApp shows all “Products” from the database in a datagrid and TestApp can add/delete a “Product” or modify the ProductName.

public class Product {
 public int ProductId { get; set; }
 public string ProductName { get; set; }
}

public DbSet<Product> Products { get; set; }

I have for example 3 pc’s where TestApp is installed and running (I’ll call them Client_X). If I add a new “Product” via Client_1, than this is not directly visible in the TestApp on Client_2 and Client_3. Only when Client_2 and Client_3 fetch all the data again (manual refresh) than I see the newly added record.

What I want to know:
How can I be aware of changes in the database via EF Code First?
How would Client_2 and Client_3 get their datagrid automatically updated because a new item was added or removed?

I’m not sure if it is asked too much but a simple sample project or simple code to demonstrate this would be useful.

FYI:
I’m fairly new to EF Code First.
(I’m using .NET 4.0 and EF Code First 4.3.1)

Thanks in advance.

Scheme:

Client_3<
         \
          \
           \
            \
             \>
Client_1 <---> [Central Database] <----> Client_2

Update/Edit:

Ok, it is clear that the Entity Framework itself doesn’t do any syncing between multiple clients.

So i’ll ask another question:
I’m thinking of working the Client-Server way:

  • A single server application which creates the database and uses the
    Entity Framework code first.
  • Multiple clients that communicate with that single server
    application.

    What would now be the best way to make sure the clients use the same data and see eachothers updates/changes?
    (I would appreciate code samples.)

  • 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-08T08:07:39+00:00Added an answer on June 8, 2026 at 8:07 am

    There is nothing you can use to notify clients using entity framework. You can write an overload for SaveChanges, or create extension method but as far as you do not have client->server architecture I can not imagine how you can achieve this.

    If you use WCF as your gateway to the database, you could create duplex communication between your client and server and as new records are available clients would be notified using Callback Channel.

    Another approach is to use MS SQL Service Broker Overview (Service Broker)

    Despite the fact, that there are many different ways to get desired result, none of them are related to entity framework as it is ORM nor a application framework or Communication framework for applications built with .NET.

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

Sidebar

Related Questions

Sorry for the confusing title. Let me explain via code: #include <string> #include <boost\function.hpp>
First of all, sorry for the vague title. Let me explain. At work we're
Let me explain my problem: I have four tables created as objects using Entity
Well let me explain the code first: First the user enters the id, the
Ok the title seems generic so let me explain. I have a note-taking application
the title might be a little bit confusing, let me explain, ;) I have
The title may have been confusing, but please let me explain: Currently when I
Sorry if the question title is confusing. Let me explain further. I am building
this is kind of a strange title, so let me explain: We have a
I'm sorry if my question title seems fundamentally uninformed. Let me explain what I

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.