“The Id field is required” validation message on Create; Id not set to [Required]

前端 未结 16 1456
盖世英雄少女心
盖世英雄少女心 2020-12-07 17:18

This is happening when I try to create the entity using a Create style action in Asp.Net MVC 2.

The POCO has the following properties:

public int Id          


        
16条回答
  •  日久生厌
    2020-12-07 17:53

    I have the same problem, using RC2 with a POCO. If you name a property Id but do not put an validation attributes on it but IsValid says it is required. If I name a property anything but Id this does not happen. Why should I have to Exclude Id?

    Thanks

提交回复
热议问题