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

Enhance CLR resolve in EF Core #320

Closed
wants to merge 1 commit into from
Closed

Enhance CLR resolve in EF Core #320

wants to merge 1 commit into from

Conversation

joaodvargas
Copy link

Hi

In our project we have some derived / proxy classes to represent our entities (types that inherit from an entity defined on the DbContext but that themselves are not). EF handles these classes fine, but despite the AuditEvent being created with all the entities it was not being persisted by Audit.NET.

I tracked the cause to the code in EntityFrameworkDataProvider.InsertEvent where the call to GetEntityType() would return null for these type of classes. I propose a small tweak to how the Clr type is resolved using this method instead. It should have the exact behavior as the FindEntityType being called now, but will also check the base class if needed.

thepirat000 added a commit that referenced this pull request Aug 8, 2020
…320)

- Audit.EntityFramework: Adding boolean `EarlySavingAudit` setting to AuditDbContext to allow the audit event to be saved **before** the entity saving operation takes place. Related to #316.
- Audit.NET.ElasticSearch: Upgrade NEST reference to version 7.8.2 to  fix exception *Could not load type Elasticsearch.Net.IInternalSerializerWithFormatter from assembly Elasticsearch.Net* (#313)
@thepirat000
Copy link
Owner

This was added on version 16.0.1
Thanks

@thepirat000 thepirat000 closed this Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants