相关疑难解决方法(0)

运行所选生成器时出错.尝试重建项目

当我创建Scaffold并添加Model类时,我收到这些错误"运行所选生成器时出错.尝试重建项目"

我有三个Model类:

1.Department.CS

2.Designation.cs

3.CompanyDBContext.cs

数据库:我在数据库中有两个表,1.部门(deptID,deptName,描述)2.指定(desgtID,desgName,description)

目标: - 我想为这些场景创建一个视图页面.像这样

插入表格名称(TextBox)+部门名称(下拉列表框)+名称名称(下拉列表框)

1.Department.CS

namespace mvcAppraisalSystem.Models
{
  public class Department
  {
    [Key]
    public int deptID { get; set; }
    public string deptName { get; set; }
    public string Description { get; set; }
  }
 }
Run Code Online (Sandbox Code Playgroud)

2.Designation.cs

namespace mvcAppraisalSystem.Models
{
   public class Designation
   {
      [Key]
      public int desgID { get; set; }
      public string desgName { get; set; }
      public string description { get; set; }
   }
 }
Run Code Online (Sandbox Code Playgroud)

3.CompanyDBContext.cs

 namespace mvcAppraisalSystem.Models
 {
   public …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework visual-studio-2013 asp.net-mvc-5

5
推荐指数
2
解决办法
2万
查看次数