i'm trying to add a new entity in my context like that :
article.Id = 1;
var rede = from r in mycontext.Redevable.AsNoTracking()
where r.Matricule == "0001414"
select r;
article.Redevable = rede.First<Redevable>();
...
mycontext.Article.Add(article);
mycontext.SaveChanges();
and i get a DbEntityValidationException saying that the Redevable is mandatory because the property "Redevable" is marker as Required.
It works fine if i remove "AsNoTracking" but the performance are very bad.
Could you help me ?
Thanks in advance.