Comments (13)
Hello @YSFKBDY ,
Do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue.
If it contains a real license, you can send the project here: [email protected]
Without a license, you can use our library for free (updating to the latest version every month to keep being in trial mode).
So, this error is not expected at all.
Best Regards,
Jon
from entityframework-extensions.
Hi @JonathanMagnan,
I don't think I can do that, but I can show you my code before and after BulkOperation changes.
Before:
foreach (var u in users)
{
u.UpdatedOn = DateTime.Now;
context.Entry(u).State = EntityState.Modified;
}
await context.SaveChangesAsync();
After:
foreach (var u in users)
{
u.UpdatedOn = DateTime.Now;
}
await context.BulkUpdateAsync(users, opt => opt.BatchSize = 5000);
I have appr. 20k test datas, but that will go way up while testing day by day. As you can see, I've changed only two lines.
I hope that would be helpful.
Regards,
Y.
from entityframework-extensions.
Hello @YSFKBDY ,
Unfortunately, that will not help.
The current error happens in our static method in the Z.BulkOperations.LicenseManager
that tries to initialize. So, the error will happen as soon as you use any of our paid features (and even a few free).
Why does it happen in your case? It is almost impossible at this moment to know. Perhaps that's only a missing dependency that has been deleted in your project or something like that. We already have some try/catch in the static method so we don't expect any error to be able to happen.
The only way to better understand this issue is by having a project that can reproduce it.
Best Regards,
Jon
from entityframework-extensions.
Hey @JonathanMagnan,
It was a missing dependency. I forgot to upload a dll file. When I've uploaded it, it worked like a charm. So, my mistake. :( Thank you for your time.
Regards,
Y.
from entityframework-extensions.
Hello @YSFKBDY ,
Great to hear everything is working as expected.
Don't hesitate to contact us if you need further assistance.
Best regards,
Jon
from entityframework-extensions.
Hello again @JonathanMagnan,
When the trial period is expired - which I am checking it with like this:
if (Z.BulkOperations.LicenseManager.IsTrialExpired())
{
//Doing some stuff to warn me.
}
I've uninstalled the NuGet package and reinstalled it, then deployed it, but it doesn't work. Z.BulkOperations.LicenseManager.IsTrialExpired()
is returning true instead of false. What am I missing here? Am I doing this "updating to the latest version every month to keep being in trial mode" part wrong?
from entityframework-extensions.
Hello @YSFKBDY ,
Sometimes you just need to clean the solution and rebuild it (the old dll
might still be used). Your code look perfect.
If the problem persists, do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue. You can send it in private here: [email protected]
That will be way easier for us to understand why it's not working on your case with a project. It looks like an issue with dll, so we cannot really reproduce it in our side.
Best Regards,
Jon
from entityframework-extensions.
Hi @JonathanMagnan,
I've cleaned and rebuild the solution, then published it to my server, but nothing changed. Still not using the bulk update.
I tried to reproduce this issue with a new solution, but it works as intended.
Steps that I follow to update:
- Manage NuGet packages, and remove the package.
- Delete package folder from
C:\Users\USERNAME\.nuget\packages
- Reinstall the package
- Clean the solution
- Rebuild the solution
- Publish it
Are there any hints for it updated successfully that I understand?
Regards,
Y.
from entityframework-extensions.
Hello @YSFKBDY ,
Here is what I recommend you, where you check for the Z.BulkOperations.LicenseManager.IsTrialExpired()
, get the assembly version to log it or throw an error:
var assemblyVersion = typeof(Z.BulkOperations.LicenseManager).Assembly.FullName;
throw new Exception("Assembly Version:" + assemblyVersion);
// Console.WriteLine(assemblyVersion);
So you will be able to at least compare the version that is currently used with the version in your project. If you have the latest version, both versions should be different. That will not fix anything, but at least it will confirm that, for an unknown reason, the wrong assembly version is currently used in your project.
Let me know the result
from entityframework-extensions.
Hi @JonathanMagnan,
It says Assembly: Z.EntityFramework.Extensions.EFCore, Version=3.102.2.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXX
. Don't know it is correct/latest version or not.
from entityframework-extensions.
Hello @YSFKBDY ,
That is indeed the latest version. I was not expecting this answer, which makes it harder to understand why it is happening.
What is the date on your server? It looks like a dumb question, but this is the only thing I can think of at this moment that could cause the issue if your server date has, by example, the wrong year.
from entityframework-extensions.
Hello @YSFKBDY ,
Since our last conversation, we haven't heard from you.
Let me know if you need more infomation.
Best regards,
Jon
from entityframework-extensions.
Hello again,
A simple reminder that we are here to assist you.
Don't hesitate to contact us if you have any questions.
Best regards,
Jon
from entityframework-extensions.
Related Issues (20)
- BulkInsert taking 20+ min for 80 000 data rows HOT 3
- Force output does not work for merge. HOT 3
- Invalid Cast. The update expression must be of type MemberInitExpression. HOT 3
- 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
- `PublicExtensions` static dictionaries are filling up HOT 4
- SQLite Invalid cast from 'System.String' to 'System.Guid' 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
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.