title: asp.net mvc 4 scaffolding not working
body: <p>I have the following class in a class library</p>
  
  <pre><code>  public class ExpenseDTO
  {
      [Key]
     public Int32 ExpenseId { get; set; }
     public Int32 ExpenseTypeId { get; set; }
  
      [Display(ResourceType = typeof(Resource), Name = "ExpenseDate")]
      [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "ExpenseDataRequired")]
      [DataType(DataType.Date,ErrorMessageResourceName="InvalidDateFormat"
          ,ErrorMessageResourceType=typeof(Resource))]
      [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
     public DateTime ExpenseDate { get; set; }
  
      [MaxLength(200, ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "ExpenseNoteMaxLength")]
      [Display(ResourceType = typeof(Resource), Name = "ExpenseNote")]
     public  String ExpenseNote { get; set; }
  
      [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "ExpenseAmountRequired")]
      [Display(ResourceType = typeof(Resource), Name = "ExpenseAmount")]
      public decimal ExpenseAmount { get; set; }
  
      public ExpenseDTO()
      {
          ExpenseNote = String.Empty;
  
      }
  
  }
  </code></pre>
  
  <p>i also have an asp.net MVC 4 project that has a class named ExpenseEditView with the following definition</p>
  
  <pre><code>public class ExpenseEditView
  {
      public ExpenseDTO Expense { get; set; }
      public IEnumerable&lt;SelectListItem&gt; ExpenseTypeList { get; set; }
      public ExpenseEditView(ExpenseDTO Expense, IEnumerable&lt;SelectListItem&gt; ExpenseTypeList)
      {
          this.Expense = Expense;
          this.ExpenseTypeList = ExpenseTypeList;
      }
  }
  </code></pre>
  
  <p>In the create method of my controller i have the following line: </p>
  
  <pre><code>public ActionResult Create()
      {
          ExpenseEditView ExpenseEdit = new ExpenseEditView(new ExpenseDTO(), GetExpenseTypeList());
          return View(ExpenseEdit);
      }
  </code></pre>
  
  <p>When i tried to use Asp.net mvc Scaffolding template for "create" Action, it created an empty view without generating any code for the properties inside class ExpenseDTO?</p>
  
  <p>Can any one please point me to what i am missing so that the template can be generated automatically for ExpenseEditView?</p>