Entity-framework – Entity Framework defaultconnectionfactory

asp.netentity-frameworkentity-framework-4.3

I've recently created a new web project using entity framework 4.3. I'm using database first design.

Entity Framework added this section to my web.config, which is giving some informational error messages. I've read somewhere that this code relates to code first design – do I need it – do I just remove it?

<entityFramework>
  <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
    <parameters>
      <parameter value="System.Data.SqlServerCe.4.0" />
    </parameters>
  </defaultConnectionFactory>
</entityFramework>

Thanks.

Best Answer

This may be very relevant (emphasis mine):

The configuration section allows you to specify a default connection factory that Code First should use to locate a database to use for a context. The default connection factory is only used when no connection string has been added to the configuration file for a context.

See Entity Framework Config File Settings on MSDN.