marinasundstrom / YourBrand

Prototype enterprise system for e-commerce and consulting services
97 stars 14 forks source link

Tenant filter is not being applied in DbContext #31

Open marinasundstrom opened 6 months ago

marinasundstrom commented 6 months ago

When testing with another tenant, I see that the tenant filters are not being applied to the entities because of failing conditions present in every DbContext.

This also affects Soft Delete filters.

We need to come up with conditions for when to apply filters. As it stands now, each service does entities a bit different from others.

Perhaps we need to unify these ways as well.

As it is now, we iterate over entity types and determine whether or not to apply filters to them. But the conditions have turned out more complex. Especially when taking inheritance into account for entity types - CatalogContext.