Comments (4)
Hello @eliottrobson ,
Thank you for reporting. We will look at this case to try to support it.
Best Regards,
Jon
from entityframework-extensions.
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.
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.
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)
- Bulk Operations for Postgres does not respect the PermanentTable setting HOT 2
- Avoid Prepared Statements for Bulk operations HOT 6
- WhereBulkContains throwing System.ArgumentNullException: 'Value cannot be null. (Parameter 'name')' HOT 15
- BulkUpdate and BulkMerge Do Not Apply Any Changes To The Table with Owned Entity HOT 1
- BulkSaveChanges results in Foreign Key Constraint Violation but SaveChanges works HOT 3
- BulkMerge is Causing Violation of PRIMARY KEY constraint HOT 1
- BulkInsert: System.IndexOutOfRangeException: 'There is no row at position 0.' HOT 4
- While inserting new record through BulkMerge it's not overriding default constraint value HOT 3
- The type initializer for 'Z.BulkOperations.LicenseManager' threw an exception HOT 13
- `PublicExtensions` static dictionaries are filling up HOT 4
- IDbCommandInterceptor does not fire when using BulkInsert or BulkDelete HOT 2
- WhereBulkContains does not work when table inherit from another table HOT 1
- Feat: Conditional insert HOT 4
- EFcore 8 UpdateFromQuery generates invalid sql HOT 5
- Microsoft.Data.SqlClient is on a vulnerable version - security update HOT 1
- BulkInsert ignoring session context value set before insert HOT 4
- BulkInsert - ERROR_34 HOT 11
- Z.EntityFramework.Plus.EFCore - Official behavior on DataAnnotations ? HOT 1
- Feat: IncludeInner extension method to force Parent/Children inner joins HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entityframework-extensions.