Sektor,
In the example where you use DbConfiguration you are setting a default connection factory. The default connection factory is used by EF when creating a connection by convention. In other words, it is used when EF needs to build a connection string for you. It is not used if you supply a connection or connection string. In the case without DbConfiguration you build and supply the connection string to your context, so the connection factory is not needed or used.
So why is it not working when you set a default connection factory? First, you are supplying the initial catalogue in the base connection string. This is something you shouldn't do when using the connection factory. The reason is if you have a full connection string, including an initial catalogue, then there is no need for a connection factory. The database name (i.e. the initial catalogue) is provided to the connection factory when it is asked to create a connection. This allows the same connection factory to create connections for many different database names. In other words, given a database name it will create a connection for that name. If you put the database name in the base connection string then it defeats the purpose of this, and you effectively just have a normal connection string for which no factory is required.
The second reason it may not be working is that the default connection factory is automatically set in the config file when you add the NuGet package. If there is a default connection factory set in the config file then this is used in preference to anything you specify in code--the config file always wins so connections, etc., can be re-configured without re-building the application.
It's worth noting that the default connection factory is intended to get people up and running quickly with Code First. Typically once you get to creating a real application you will want to just use appropriate connection strings and not use the connection factory at all.
Thanks,
Arthur