Git Product home page Git Product logo

Comments (13)

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

YSFKBDY avatar YSFKBDY commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

YSFKBDY avatar YSFKBDY commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

YSFKBDY avatar YSFKBDY commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

YSFKBDY avatar YSFKBDY commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

YSFKBDY avatar YSFKBDY commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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.

JonathanMagnan avatar JonathanMagnan commented on May 28, 2024

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)

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.