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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:55:35+00:00 2026-06-01T01:55:35+00:00

Lest say that we have several pages that retrieve items from the same EntitySet.

  • 0

Lest say that we have several pages that retrieve items from the same EntitySet. If I add a new entity on one page, I need to add it to both EntitySet collection and myCollection:

Context.EntitySet.Add(item);
myCollection.Add(item);

What is the best way to notify other pages that new item is added (or deleted)? Editing an entity is no problem, since all pages get change notification without any problem.

  • 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-01T01:55:36+00:00Added an answer on June 1, 2026 at 1:55 am

    Instead of binding to different instances of IEnumerable<T> myCollection, the recommended approach is to bind directly to Context.EntitySet<T>. EntitySet<T> implements INotifyCollectionChanged and INotifyPropertyChanged interfaces. When you bind to the same instance of EntitySet<T>, each page may be notified of changes by responding to the EntitySet<T>.CollectionChanged event. For example:

    // Page 1
    _myCollection = Context.EntitySet<MyItem>();
    _myCollection.CollectionChanged += MyItemsChanged;
    
    ...
    
    // Page 2
    _myCollection = Context.EntitySet<MyItem>();
    _myCollection.CollectionChanged += MyItemsChanged;
    

    When any page adds or removes from the collection, all pages are notified.

    In regards to your comment, IEnumerable<T> does not implement the INotifyCollectionChanged interface and does not publish any change notifications. The best results come from using the EntitySet<T> directly.

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

Sidebar

Related Questions

Lest say i have a link and when some one click on that link
I have a problem.... Lest say I have a class like this one: public
Lest just say i have a movieClip A which contains movieClips B1,B2,B3,B4,B5 I write
lest say I have two lists List1: Tom, Frank, Lacey List2: Frank, Tom what
I have a table witch is in intense workload lest say T1 (about 100
I have 2 tables (entity) a person entity and a vacation entity. One person
Lest's say I have string: String test= "AA BB CC BB BB CC BB";
I have another class that creates the connection (see refined class half way down
This is one of the toughest things I have ever tried to do. Over
I am trying to test that a particular method throws an expected exception from

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.