It’s easy to start from a working example.
I’ve created on GitHub a starter project that make use of ASP.NET MVC, Entity Framework 5 and SQL Compact Framework which gives you all the wirings needed to start build a data oriented application.
Business project contains a Model namespace in which you can put your application domain objects along with the BusinessContext object which describes your data context, exposing the entities and explicitly invoking the connection string which in mentioned in class constructor.
BusinessContextInitializer is make use of DropCreateDatabaseIfModelChanges strategy, so any change on the Model will trigger a database recreation (useful for development).
In the Web project the web.config file contains an connection string called BusinessContext that wires up a SQL Compact database but it can be changed to a SQL Server connection.
GitHub repo link: https://github.com/mitasoft/template-mvc-codefirst-sqlce