Je présente un problème connu de beaucoup, mais cela me dérange et j'ai besoin de votre aide. Peut-être est simple ... mais parfois d'autres yeux peuvent voir ce que nous ne pouvons pas voir ....Les arguments de type pour la méthode System.Data.Entity.ModelConfiguration.EntityTypeConfiguration <Proyect.Models.Entity> .HasMany <TTargetEntity>
J'ai cette méthode:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<ValorAtributoProducto>()
.HasMany(i => i.AtributoProducto)
.WithRequired().WillCascadeOnDelete(true);
}
Cette erreur complète:
System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Proyect.Models.ValorAtributoProducto>.HasMany<TTargetEntity>(System.Linq.Expressions.Expression<System.Func<Proyect.Models.ValorAtributoProducto,System.Collections.Generic.ICollection<TTargetEntity>) cannot be inferred from the usage. Try specifying the type arguments explicitly.
super, merci pour vos conseils – Harry