Hello -
I know its an old issue but the answer on previos posts doesn't solve the probleme for me.. what i mean is I've already added the virtual keyword to all attributes.
Here is the example code of entity which prodeces that error.
public class ApplicationMember
{
static ApplicationMember()
{
Triggers<ApplicationMember>.Updating += entry =>
{
ApplicationMember V1 = entry.Entity;
ApplicationMember V2 = entry.Original;
if(V1.Email != V2.Email)
{
}
};
}
public virtual Int32 ID { get; set; }
[DataType(DataType.EmailAddress)]
public virtual String Email { get; set; }
[DataType(DataType.Password)]
public virtual String Password { get; set; }
public virtual ICollection<ApplicationMember> ApplicationMembers { get; set; }
}
If I remove public virtual ICollection<ApplicationMember> ApplicationMembers { get; set; } I'm able to access the original property but with that line its not possible and thow that exception.
System.TypeInitializationException: "Der Typeninitialisierer für "EntityFramework.TypedOriginalValues.OriginalValuesWrapper`1" hat eine Ausnahme verursacht."
Hello - I know its an old issue but the answer on previos posts doesn't solve the probleme for me.. what i mean is I've already added the virtual keyword to all attributes.
Here is the example code of entity which prodeces that error.
If I remove
public virtual ICollection<ApplicationMember> ApplicationMembers { get; set; }
I'm able to access the original property but with that line its not possible and thow that exception.System.TypeInitializationException: "Der Typeninitialisierer für "EntityFramework.TypedOriginalValues.OriginalValuesWrapper`1" hat eine Ausnahme verursacht."
Would be thanksfull for every help :)
BTW: It's a really awesome libary :)
Greetz PowerOfGit