Skip to content
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

How can I use this with a custom IDatabaseCreator? #619

Open
Bouke opened this issue Feb 26, 2025 · 5 comments
Open

How can I use this with a custom IDatabaseCreator? #619

Bouke opened this issue Feb 26, 2025 · 5 comments
Assignees

Comments

@Bouke
Copy link

Bouke commented Feb 26, 2025

I'm trying to use a custom IDatabaseCreator, but this project (v3.103.3) doesn't like that. It seems to be using the defining assembly of the IDatabaseCreator against a hard-coded list of assembly names to determine which provider is being used. I don't this is the right way to determine the provider, as is now evident from the error I'm getting:

System.Exception: The provider is not supported yet: 'MyProject.Assembly.Name. If you believe it's a mistake, please report this message to our support team: [email protected] , v=3.103.3.0
at Z.EntityFramework.Extensions.BatchDelete.CreateCommand(IQueryable query, IEntityType entity)
at Z.EntityFramework.Extensions.BatchDelete.Execute[T](IQueryable1 query) at BatchDeleteExtensions.DeleteFromQuery[T](IQueryable1 query, Action`1 batchDeleteBuilder)

The custom IDatabaseCreator is configured like this:

services.Replace(new ServiceDescriptor(typeof(IRelationalDatabaseCreator), typeof(MyDatabaseCreator), ServiceLifetime.Scoped));
@JonathanMagnan JonathanMagnan self-assigned this Feb 26, 2025
@JonathanMagnan
Copy link
Member

Hello @Bouke ,

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.

We currently do not support IDatabaseCreator but we could try if you provide a project that use it (We just want to ensure we work on a solution that will work for your project).

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @Bouke,

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

Let me know if you need more information.

Best regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @Bouke

Unfortunately, since we didn't hear from you I will close this issue.

As previously mentioned, we need a runnable project to be able to assist you.

We will reopen the issue if a project is received.

Feel free to contact us for questions, issues or feedback.

Best Regards,

Jon

@Bouke
Copy link
Author

Bouke commented Mar 13, 2025

Hi Jon, thank you for getting back to me. I think my initial report shows what I'm trying to do. I'm overriding the default database creator with my own. Then your extension fails, as it tries to identify the sql flavour at runtime by looking at which assembly the database creator is coming from. It doesn't recognise my custom database creator and then fails with the mentioned exception.

@JonathanMagnan
Copy link
Member

Hello @Bouke , indeed, your initial report shows what you are trying to do.

But my developer asked for a project to ensure he works on a solution that will work with your custom database creator.

In short, if you want us to try to support it, we require a runnable project as previously asked.

Best Regards,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants