I have a model like the following:
[Table("forms", Schema = "mySchema")]
public class forms
{
[Key]
public int ID { get; set; }
public string field1 { get; set; }
public string field2 { get; set; }
}
This works in MVC 3, however in MVC 4 the attribute Table in not recognized. I have the System.ComponentModel.DataAnnotations namespace included, and the dll referenced, along with EntityFramework.dll. The version of EF has changed between MVC 3 and 4. If I reference the MVC 3 EF dll, Table is recognized, however Schema is not. The reason for using the table attribute is so I can specify the schema. What am I missing?
According to msdn the TableAttribute supports the schema property.
Maybe use: