The context factory is required to provide a working context to the EFE library. This context will be used by example to retrieve some information by attaching/detaching entities without impacting the current context.
If your context has a default constructor (no parameter), specifying a context factory may be optional unless your context requires some special configuration.
Having a default context constructor or specifying a context factory is only required with the following options:
Having a default context constructor or specifying a context factory is always required.
The context factory is a function Func<DbContext, DbContext> that provide the current DbContext as a parameter and require to return a new DbContext.
The current DbContext is passed in a parameter in case you need to create a working context that depends on the current context configuration or type.
If your context has a default constructor, you might now need to specify a context factory.