Git Product home page Git Product logo

Comments (2)

JonathanMagnan avatar JonathanMagnan commented on May 27, 2024

Hello @rabberbock ,

This issue happens when there is a duplicate (exactly the same instance) of one of your entities in the list such as:

var customerA = new Customer();
var customerB = new Customer();

var list = new List<Customer>();
list.Add(customerA);
list.Add(customerA); // added twice
list.Add(customerB);

We had some inconsistency before about how this scenario was handled (for example, BulkInsert was working, but Include Graph was throwing an error, so indeed starting from v7.100.0.0, this error start to appear for more scenarios.

Is there a reason on your side that an entity would be a duplicate in your list?

Obviously, to fix it, you can simply use the Distinct method, but that's maybe not something you can do:

context.BulkInsert(list.Distinct());

Best Regards,

Jon

from entityframework-extensions.

rabberbock avatar rabberbock commented on May 27, 2024

@JonathanMagnan Thanks for the detailed explanation! That was exactly it and we don't need duplicates in our scenario. So all good to go on this issue.

from entityframework-extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.