Quick access

The Contoso University application created by the first of two Web Forms tutorial series at http://asp.net/entity-framework/tutorials/. Continues to be provided alongside version 2 so that it can be used as a starting point for working through the second tutorial series.

Hi,
Actually I have downloaded your project and I must say this is a very good project specially for beginners (like me).
I was editing the student name and found that I can enter duplicate records and there is no validation available for that. Can you please help me to implement the validation so that I would not be able to enter a duplicate new record and also I should not be able to update any existing record (if same student is already exist).
Thanks,

This sounds like a deployment issue rather than an issue with the project code. I'd recommend looking at one of our deployment tutorials, such as
http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/introduction
There's an entry in the Troubleshooting tutorial in that series for your error message that might be helpful:
http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/troubleshooting

The application uses a LocalDB database that is stored in an .mdf file in the App_Data folder. If you use Visual Studio templates to create MVC or Web Forms projects, by default they specify a LocalDB database for the membership database. It's portable in that it gets copied with the project, but you can't use it when you deploy to production because LocalDB doesn't work with IIS. For an overview of SQL Server editions, see http://msdn.microsoft.com/en-us/library/ms178359.aspx#sqlserver.

The database is portable only in the sense that you can copy the project and it goes with the project because it's a file in the App_Data folder. Most hosting providers don't run SQL Express and you wouldn't typically use SQL Express UserInstance in production. For more information about deploying a web project with a database to a production environment, see
http://msdn.microsoft.com/en-us/library/dd394698(v=vs.110).aspx

Hi
I am starting with VB Web Express 2012 - only worked with VB6 before (& SQL db)
I don't find "ASP.NET Web Application template" - only empty Web site, Web Forms site, same with Razor and Dynamic Entities . . .
I have tried them all and yet I cannot find NavigationMenu even searching through each project?
Also I installed SQLExpress 2005, but when I clicked on the AppData, it returned an error message saying that I needed to make a new connection?
Any ideas?
Regards
Tony

Hi Tom
Eventually (!) I removed 2012 and installed 2010 . . .
and it all works perfectly! :)
Thanks so much
A question from tutorial 10 -
Earlier you created a student statistics grid for the About page that showed the number of students for each enrollment date. The code that does this in HomeController.cs uses LINQ:
var data = from student in db.Students
group student by student.EnrollmentDate into dateGroup
select new EnrollmentDateGroup()
{
EnrollmentDate = dateGroup.Key,
StudentCount = dateGroup.Count()
};
How does this still work when the Students table is no longer there, having been replaced by the Persons table?

On the value of LINQ, see this MSDN page: http://msdn.microsoft.com/en-us/library/ms178359.aspx#linq
In the earlier tutorial, Code First maps the Student entity to the Student table. In the later tutorial, the Student entity has been changed so that it derives from the Person entity, and from this Code First knows to look in the Person table for student data. Your code can remain the same, but EF looks in different database tables for the data depending on how the entity is configured.