I have the following properties, but when I am going to validate via ModelState.IsValid it returns that the description of the user group being informed that it is UserId too, but the problem is that I am prompting for the bank itself to generate the key. How do I not display these inconsistencies?
Usergroup is being populated with a DropdownList.
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int UsuarioId { get; set; }
[Required(ErrorMessage = "Nome do usuário deve ser informado")]
public string UsuarioDeAcesso { get; set; }
[Required(ErrorMessage = "Senha do usuário deve ser informada")]
public string SenhaDeAcesso { get; set; }
[Required(ErrorMessage = "Grupo deve ser selecionado")]
public int GrupoDeUsuarioId { get; set; }
[Required(ErrorMessage = "Grupo deve ser selecionado")]
public GrupoDeUsuario GrupoDeUsuario { get; set; }