Create a new controller - error starting the selected code generator

I am using Visual Studio Express 2013 for the web (specifically version 12.0.21005.1 REL). This is my first project using VS2013, I have used VS2012 until now.

I am trying to create a new controller in my asp.net MVC application. I am using Entity Framework 5 with the first code (.NET 4.5). I want Visual Studio to create a template for me (you know, a controller with views for reading / writing / deleting, etc., Instead of writing code myself from scratch).

However, every time I try to create a controller, I get the following error message:

enter image description here

Is there some kind of error in VS 2013? I cannot understand what this means, and restarting VS2013 does not help.

gory... , , .

:

namespace ProfessionalSite.Models
{
    public class EntityModels
    {

        public class Student
        {
            public int ID { get; set; }
            public string LastName { get; set; }
            public string FirstMidName { get; set; }

            public virtual ICollection<Enrollment> Enrollments { get; set; }
        }


        public class Enrollment
        {
            public int ID { get; set; }
            public string EnrollmentName { get; set; }
            public string Credits { get; set; }
        }


        // Create the class that inherits from DbContext
        // The name of this class is also used as the connection string in web.config 
        public class EFDbContext : DbContext
        {
            public DbSet<Student> Students { get; set; }
            public DbSet<Enrollment> Enrollments { get; set; }
            } 
    }
}

web.config

<add name="EFDbContext"
         connectionString="Data Source=JONSNA\SQLEXP2012WT;Initial Catalog=ProfessionalSiteDb; Integrated Security=True; MultipleActiveResultSets=True"
         providerName="System.Data.SqlClient"/>

.

. " ".

enter image description here

enter image description here

"",

enter image description here

, . , , , -, . VS2012 ...

. .

+4
1

EntityModels, . :

namespace ProfessionalSite.Models
{
        public class Student
        {
            public int ID { get; set; }
            public string LastName { get; set; }
            public string FirstMidName { get; set; }
            public virtual ICollection<Enrollment> Enrollments { get; set; }
        }

        public class Enrollment
        {
            public int ID { get; set; }
            public string EnrollmentName { get; set; }
            public string Credits { get; set; }
        }

        // Create the class that inherits from DbContext
        // The name of this class is also used as the connection string in web.config 
        public class EFDbContext : DbContext
        {
            public DbSet<Student> Students { get; set; }
            public DbSet<Enrollment> Enrollments { get; set; }
        } 
}

, , Student Enrollment Model.

+1

All Articles