ASP.NET MVC Application Using Entity Framework Code First

A Visual Studio 2013 project which shows how to use the Entity Framework 6 in an ASP.NET MVC 5 web application project, using the Code First development approach.

C# (541.9 KB)
4.4 Star
668,859 times
Add to favorites
E-mail Twitter Digg Facebook

Solution explorer

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <title>Your ASP.NET application</title>
        body {
            background: #fff;
            color: #505050;
            font: 14px 'Segoe UI', tahoma, arial, helvetica, sans-serif;
            margin: 20px;
            padding: 0;

        #header {
            background: #efefef;
            padding: 0;

        h1 {
            font-size: 48px;
            font-weight: normal;
            margin: 0;
            padding: 0 30px;
            line-height: 150px;

        p {
            font-size: 20px;
            color: #fff;
            background: #969696;
            padding: 0 30px;
            line-height: 50px;

        #main {
            padding: 5px 30px;

        .section {
            width: 21.7%;
            float: left;
            margin: 0 0 0 4%;

            .section h2 {
                font-size: 13px;
                text-transform: uppercase;
                margin: 0;
                border-bottom: 1px solid silver;
                padding-bottom: 12px;
                margin-bottom: 8px;

            .section.first {
                margin-left: 0;

                .section.first h2 {
                    font-size: 24px;
                    text-transform: none;
                    margin-bottom: 25px;
                    border: none;

                .section.first li {
                    border-top: 1px solid silver;
                    padding: 8px 0;

            .section.last {
                margin-right: 0;

        ul {
            list-style: none;
            padding: 0;
            margin: 0;
            line-height: 20px;

        li {
            padding: 4px 0;

        a {
            color: #267cb2;
            text-decoration: none;

            a:hover {
                text-decoration: underline;

    <div id="header">
        <h1>Your ASP.NET application</h1>
        <p>Congratulations! You've created a project</p>

    <div id="main">
        <div class="section first">
            <h2>This application consists of:</h2>
                <li>Sample pages showing basic nav between Home, About, and Contact</li>
                <li>Theming using <a href="">Bootstrap</a></li>
                <li><a href="">Authentication</a>, if selected, shows how to register and sign in</li>
                <li>ASP.NET features managed using <a href="">NuGet</a></li>

        <div class="section">
            <h2>Customize app</h2>
                <li><a href="">Get started with ASP.NET MVC</a></li>
                <li><a href="">Change the site's theme</a></li>
                <li><a href="">Add more libraries using NuGet</a></li>
                <li><a href="">Configure authentication</a></li>
                <li><a href="">Customize information about the website users</a></li>
                <li><a href="">Get information from social providers</a></li>
                <li><a href="">Add HTTP services using ASP.NET Web API</a></li>
                <li><a href="">Secure your web API</a></li>
                <li><a href="">Add real-time web with ASP.NET SignalR</a></li>
                <li><a href="">Add components using Scaffolding</a></li>
                <li><a href="">Test your app with Browser Link</a></li>
                <li><a href="">Share your project</a></li>

        <div class="section">
                <li><a href="">Ensure your app is ready for production</a></li>
                <li><a href="">Windows Azure</a></li>
                <li><a href="">Hosting providers</a></li>

        <div class="section last">
            <h2>Get help</h2>
                <li><a href="">Get help</a></li>
                <li><a href="">Get more templates</a></li>