Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.26k stars 256 forks source link

IdentitySample Throwing Early Exception #824

Closed benholtsclaw closed 1 month ago

benholtsclaw commented 1 month ago

Trying to run the IdentitySample from the repository and getting a runtime exception.

builder.Build() throws

{"Error while validating the service descriptor 'ServiceType: IdentitySample.Data.ApplicationDbContext Lifetime: Scoped ImplementationType: IdentitySample.Data.ApplicationDbContext': No constructor for type 'IdentitySample.Data.ApplicationDbContext' can be instantiated using services from the service container and default values."} System.Exception {System.InvalidOperationException}

Is this because the ApplicationDbContext constructor is unable to resolve AppTenantInfo ?

AndrewTriesToCode commented 1 month ago

Thanks for letting me know. I need to add a constructor to the db context that accepts IMultiTenantContexfAccessor per the recent breaking change with v7. I will try to do so tonight.

TimVerheul commented 23 hours ago

@AndrewTriesToCode I still have this issue.