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
(184)
667,430 times
Add to favorites
2/11/2017
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Your ASP.NET application</title>
    <style>
        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;
            }
    </style>
</head>
<body>

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

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

        <div class="section">
            <h2>Customize app</h2>
            <ul>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320757">Get started with ASP.NET MVC</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320758">Change the site's theme</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320759">Add more libraries using NuGet</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320760">Configure authentication</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320761">Customize information about the website users</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320762">Get information from social providers</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320763">Add HTTP services using ASP.NET Web API</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320764">Secure your web API</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320765">Add real-time web with ASP.NET SignalR</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320766">Add components using Scaffolding</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320767">Test your app with Browser Link</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320768">Share your project</a></li>
            </ul>
        </div>

        <div class="section">
            <h2>Deploy</h2>
            <ul>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320769">Ensure your app is ready for production</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320770">Windows Azure</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320771">Hosting providers</a></li>
            </ul>
        </div>

        <div class="section last">
            <h2>Get help</h2>
            <ul>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320772">Get help</a></li>
                <li><a href="http://go.microsoft.com/fwlink/?LinkID=320773">Get more templates</a></li>
            </ul>
        </div>
    </div>

</body>
</html>