How to specify database name in Code First? by Tarik Create a connection string in the app.config/web.config with the same name as the context and the EF will use that DB.