-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force output does not work for merge. #563
Comments
Hello @Alexn , Thank for reporting. Unfortunately, we don't have any solution at this moment to cover this scenario. We have the option
We currently have a new method under development that will allow you to read and output values directly into your entities, but it will still take several weeks before we complete it. Best Regards, Jon |
Hello @JonathanMagnan, Thanks for answer. I tried to use BulkInsert + InsertIfNotExists, and it does not work as expected. Could you please look in to the Fiddle, and figure out it? Fiddle |
Hello @Alexn , I should have said it in my first answer: you also need to select which properties you want to output. Here is a working fork from your latest Fiddle: https://dotnetfiddle.net/XvCPIs context.Set<Customer>().BulkInsert(customers, options =>
{
//options.ForceSelectOutput = true;
options.InsertIfNotExists = true;
options.InsertKeepIdentity = true;
options.ColumnOutputExpression = x => new { x.Name, x.Email, x.Note, x.Created, x.Updated };
options.ForceOutputFromUnmodifiedRow = true;
}); I commented the option |
Description
I can't force output for unmodified rows during merge.
My goal is have the same state in memory and database after merge.
Fiddle
https://dotnetfiddle.net/4gUqmr
The text was updated successfully, but these errors were encountered: