I'm using EF to remove a record from the database on "Document.BeforeDelete" and I'm getting this error:
The
type 'System.Data.Objects.ObjectContext' is defined in an assembly that
is not referenced. You must add a reference to assembly
'System.Data.Entity, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
This error is errorneous as I do reference the System.Data.Entity assembly in my project.
I was able to resolve the above issue by adding this reference <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> to the <compilation><assemblies> section in the web.config. however the Document.BeforeDelete event doesn't see to be firing.
Using Entity Framework 4 with ApplicationBase
UMB 4.7.1
EF4
I'm using EF to remove a record from the database on "Document.BeforeDelete" and I'm getting this error:
The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
This error is errorneous as I do reference the System.Data.Entity assembly in my project.
I was able to resolve the above issue by adding this reference <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> to the <compilation><assemblies> section in the web.config.
however the Document.BeforeDelete event doesn't see to be firing.
Any insight?
The event should always fire do you have any code to show?
The event should always fire do you have any code to show?
The Document.MoveToTrash event is what I shoild have handled. As this event fires first.
is working on a reply...