Creating our first "Code First" application
Our first application will create a database from code. We will start by creating an ASP.NET project that we will reuse in the following recipes.
Getting ready
In order to use this recipe, you should have Visual Studio 2012 installed.
How to do it...
Here we will create a Code First application and see the main concepts behind this technology and how to use it properly.
- First open Visual Studio 2012 and create a new project. We will select the ASP.NET MVC 4 Web Application template from Visual C# | Web and name it
EFCodeFirst
as shown in the following screenshot: - Select the Internet Application template as ...
Get Microsoft .NET Framework 4.5 Quickstart Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.