




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































For more titles, visit the E-Book Gallery for Microsoft Technologies.
Creating an Entity Framework Data Model
Introduction
Software versions used in the tutorial
Tutorial versions
Questions and comments
The Contoso University Web Application
Create an MVC Web Application
Set Up the Site Style
@Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @RenderSection("scripts", required: false)
@{ ViewBag.Title = "Home Page"; }
Contoso University
Welcome to Contoso University
Contoso University is a sample application that demonstrates how to use Entity Framework 6 in an ASP.NET MVC 5 web application.
Build it from scratch
You can build the application by following the steps in the tutorial series on the ASP.NET site.
See the tutorial »
Download it
You can download the completed project from the Microsoft Code Gallery.
Download »
The Student Entity
using System; using System.Collections.Generic;
namespace ContosoUniversity.Models { public class Student { public int ID { get; set; } public string LastName { get; set; }
public string FirstMidName { get; set; } public DateTime EnrollmentDate { get; set; } public virtual ICollection Enrollments { get; set; } } }
The Enrollment Entity
namespace ContosoUniversity.Models { public enum Grade { A, B, C, D, F }