Closed
Description
Ref #116
Remove the obsolete constructor, note that this is still being actively called in all projects since the DI framework will call the constructor with the most available parameters.
public class DefaultEntityRepository<TEntity, TId>
: IEntityRepository<TEntity, TId>
where TEntity : class, IIdentifiable<TId>
{
[Obsolete("DbContext is no longer directly injected into the ctor. Use JsonApiContext.GetDbContextResolver() instead")]
public DefaultEntityRepository(
DbContext context,
ILoggerFactory loggerFactory,
IJsonApiContext jsonApiContext)
{
_context = context;
_dbSet = context.GetDbSet<TEntity>();
_jsonApiContext = jsonApiContext;
_logger = loggerFactory.CreateLogger<DefaultEntityRepository<TEntity, TId>>();
_genericProcessorFactory = _jsonApiContext.GenericProcessorFactory;
}
}