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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:46:40+00:00 2026-06-04T07:46:40+00:00

i when i try to save my entitie buzzmate i have this exception :

  • 0

i when i try to save my entitie buzzmate i have this exception :

     An entity object cannot be referenced by multiple instances of IEntityChangeTracker.

this is the code that generate this exception :

        var p = Session["mayaProfile"] as MayaProfile;
        BuzzMate buzzmate = new BuzzMate();
        buzzmate.MayaProfile = p;
        SocialBuzzCompaign socialcampaign = _buzzService.GetSocialBuzzCompaign(model.socialBuzzCompaignId);
        //Ajouter le BuzzMate
        buzzmate.SocialBuzzCompaign = socialcampaign;
        buzzmate.JoiningStatus = JoiningStatus.Approved;
        buzzmate.SelectionType = BuzzMateSelectionType.InvitedByBuzzLeader;                     
        //try
        //
        _buzzService.AddBuzzMate(buzzmate);

and this is method AddBuzzMate :

    public void AddBuzzMate(BuzzMate buzzMate)
    {
        _buzzMateRepository.Insert(buzzMate);
        _buzzMateRepository.Save();
    }

when i try to save buzzmate i have exception

  • 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-04T07:46:41+00:00Added an answer on June 4, 2026 at 7:46 am

    The problem is most probably p. Don’t use entities stored in session for persistence or you will not avoid this error. Try to create clone of p and assign it to buzzmate and if you use same EF context for loading socialcampaign and persisting buzzmate it should work.

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

Sidebar

Related Questions

When I try to save a certain of my ActiveRecord instances, I get this
I'm using this piece of code to try and save an image to the
When I try to save an entity I get an error: Object reference not
I try to save an edited Entity Framework entity ApplyPropertyChanges, and get an exception:
according to this image, i try to save data in NSUserDefaults but my App
I have a POST controller action like: if (ModelState.IsValid) { try { //.. save
While I try to save top level entity (using JPA), do I need to
Imagine an CoreData entity (e.g. named searchEngine ). NSManagedObjectContext manages some instances of this
I have this simple situation: @Entity public class Customer{ @ManyToMany(fetch=FetchType.EAGER) @Cascade(CascadeType.SAVE_UPDATE) private List<Product> products=new
I'm working with Entity Framework code first. The error occurs when trying to save

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.