Table attribute in MVC 4 is not recognized

前端 未结 1 379
陌清茗
陌清茗 2021-01-21 21:29

I have a model like the following:

[Table(\"forms\", Schema = \"mySchema\")]
public class forms
{
  [Key]
  public int ID { get; set; }
  public string field1 {          


        
1条回答
  •  悲哀的现实
    2021-01-21 21:39

    According to msdn the TableAttribute supports the schema property.

    Maybe use:

    [Table(Name = "forms", Schema = "mySchema")]
    

    0 讨论(0)
提交回复
热议问题