Skip to content
Discussion options

You must be logged in to vote

As long as the repository doesn't depend on your DbContext, it should be fine. I would probably extract the Audit Entity action into a dedicated method within the DbContext:

public sealed class ApplicationDbContext : AuditDbContext
{  
  private readonly IDeliveryMethodRepository _deliveryMethodRepository;
  
  public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IDeliveryMethodRepository deliveryMethodRepository) : base(options)
  {
      _deliveryMethodRepository = deliveryMethodRepository;
  
      AuditDataProvider = new EntityFrameworkDataProvider(entityFrameworkProviderConfigurator =>
      {
          entityFrameworkProviderConfigurator
              .UseDbCo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@izabelab-cdcdevelopment
Comment options

Answer selected by izabelab-cdcdevelopment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants