Git Product home page Git Product logo

Comments (4)

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

Hello @eliottrobson ,

Thank you for reporting. We will look at this case to try to support it.

Best Regards,

Jon

from entityframework-extensions.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

Hello @eliottrobson ,

Do you need to output the inserted Guid to your custom CustomerID?

If not, you can already fix it by using cfg.AutoMapOutputDirection = false; such as:

context.Customers.BulkMerge(newCustomers, cfg =>
{
	cfg.ColumnPrimaryKeyExpression = x => new { x.CustomerId };
	// IgnoreOnMergeUpdateExpression ==> this one is not required (We do not update the key used)
	cfg.IgnoreOnMergeUpdateExpression = x => new { x.CustomerId };  
	cfg.IgnoreOnMergeInsertExpression = x => new { x.CustomerId };
	cfg.AutoMapOutputDirection = false;

});

Here is an example: https://dotnetfiddle.net/gGxIGu

Let me know if that solves your issue or if you really need to output this value.

Best Regards,

Jon

from entityframework-extensions.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

Hello @eliottrobson,

Since our last conversation, we haven't heard from you.

Is everything working as expected?

Let me know if you need more information.

Best regards,
Jon

from entityframework-extensions.

eliottrobson avatar eliottrobson commented on May 28, 2024

Apologies for not getting back to you sooner but unfortunately we do need to use the ID as part of the rest of the process. We've managed to work around this by not using BulkMerge in this specific part of the application but would be nice to get it fixed so we can take advantage of the performance at scale!

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.