Code-First Development with Entity Framework 4 - How to Use Sql Server

I read Scott Guthrie's post on Code First Development using EF 4. post-> http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4 .aspx

This post refers to code features first, and then generates dabatase using SQL Compact Edition and sdf file.

I would like to know if it is possible to use the SQL SERVER 2008 database with the first approach of EF4 code and what I need to change in the web.config file or in other areas of my application in order to create a database for 2008 instead of CE.

Currently, this example displays the webconfig scope with the following data:

<connectionStrings configSource="ConnectionStrings.config" />
<system.data>
    <DbProviderFactories>
        <remove invariant="System.Data.SqlServerCe.4.0" />
        <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    </DbProviderFactories>
</system.data>

Thanks in advance. brgds

+3
1

, . , SQL Server 2008: EF4 Code First Walkthrough

+3

All Articles