0
I have the following model (DTO):
public class PessoaAcesso : Pessoa
{
[Remote("LoginUnico", "Pessoa", ErrorMessage = "Esse Login já existe! Escolha outro.")]
public virtual string Login { get; set; }
...
}
In my Apicontroller (Webapi) I implemented the "Loginunico" method for testing:
public JsonResult<bool> LoginUnico(string login)
{
return Json(false);
}
But when making the request via POST is not triggering the method. It was for him to reject the insertion of the new person, but is accepting.
Who has already implemented Remote() in the Webapi can guide me.
Have you noted
[HttpPost]
inAction
before testing?– Leonel Sanches da Silva