Fejl i repository
Hej,Jeg har et problem med klassen repository i et mvc project.
public virtual T Add(T entity)
{
try
{
this.context.LoadRequiredProperties<T>(this.set.Add(entity)).SaveChanges();
}catch(Exception e)
{
throw e;
}
return entity;
}
Der opstår fejlen:
An exception of type 'System.Data.Entity.Validation.DbEntityValidationException' occurred in ProgC.Model.dll but was not handled in user code
Additional information: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Findes der en mere præcis exception type?
Handler det om at data ikke passer ind i tabeller?
Mvh
p_gaard