Open isakatirci opened 5 years ago
I fix this problem with doing debug :D
@isakatirci Would you be able to open a pull request with your fix?
Beware! I think ApplyChanges crushes with Dates in Cultures different from English.
[NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.] TrackableEntities.EF6.DbContextExtensions.IsComplexType(DbContext dbContext, Type entityType) +247 TrackableEntities.EF6.DbContextExtensions.SetEntityState(DbContext context, ITrackable item, ITrackable parent, String propertyName, EntityState state, IEnumerable1 interceptors) +96 TrackableEntities.EF6.DbContextExtensions.SetChanges(DbContext context, ITrackable item, EntityState state, ObjectVisitationHelper visitationHelper, ITrackable parent, String propertyName, IEnumerable
1 interceptors) +1337 TrackableEntities.EF6.DbContextExtensions.ApplyChanges(DbContext context, ITrackable item, ITrackable parent, ObjectVisitationHelper visitationHelper, String propertyName, Nullable1 state, IEnumerable
1 interceptors) +2696 TrackableEntities.EF6.DbContextExtensions.ApplyChanges(DbContext context, ITrackable item) +113 Repository.Pattern.Ef6.Repository`1.Delete(TEntity entity) +31 Registro_Jornada_Laboral.Services.
It would be great to solve this matter.
Commented in #225. Would like to merge the PR but it needs to be re-done.
A release would be very appreciated. I am using URF.NET and this bug forces me to keep it in old version 4.2 . I tried to get development version of TrackableEntities, but it is labeled something below 2.5.7 - and URF.NET requires 2.5.7 at least. So I am stuck with 4.2, and old CommonLocator in turn as well.
I have this error. Please help me?
System.NullReferenceException: Object reference not set to an instance of an object. at TrackableEntities.EF6.DbContextExtensions.IsComplexType(DbContext dbContext, Type entityType) at TrackableEntities.EF6.DbContextExtensions.SetEntityState(DbContext context, ITrackable item, ITrackable parent, String propertyName, EntityState state, IEnumerableb9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultb__11_0()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c DisplayClass11_1.b2()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass7_0.b1(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultb3()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass3_1.b5(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultb 152_1(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoidb__151_2(IAsyncResult asyncResult, Controller controller)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoidb__20_1(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid
1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChanges(DbContext context, ITrackable item, ITrackable parent, ObjectVisitationHelper visitationHelper, String propertyName, Nullable
1 state, IEnumerable1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChangesOnCollectionProperties(TrackingState stateFilter, Boolean includeState, EntityNavigationProperty navProp, EntityCollectionProperty
1 colProp, DbContext context, ITrackable item, ObjectVisitationHelper visitationHelper, Nullable1 state, IEnumerable
1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChangesOnProperties(DbContext context, ITrackable item, ObjectVisitationHelper visitationHelper, Nullable1 state, IEnumerable
1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChanges(DbContext context, ITrackable item, ITrackable parent, ObjectVisitationHelper visitationHelper, String propertyName, Nullable1 state, IEnumerable
1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChangesOnProperties(DbContext context, ITrackable item, ObjectVisitationHelper visitationHelper, Nullable1 state, IEnumerable
1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChanges(DbContext context, ITrackable item, ITrackable parent, ObjectVisitationHelper visitationHelper, String propertyName, Nullable1 state, IEnumerable
1 interceptors) at TrackableEntities.EF6.DbContextExtensions.ApplyChanges(DbContext context, ITrackable item) at Repository.Pattern.Ef6.Repository1.Update(TEntity entity, Boolean traverseGraph) in C:\Users\isa\source\repos\Helezon.FollowMe\Helezon.FollowMe.Repository.Pattern.Ef6\Repository.cs:line 70 at Service.Pattern.Service
1.Update(TEntity entity) in C:\Users\isa\source\repos\Helezon.FollowMe\Helezon.FollowMe.Service.Pattern\Service.cs:line 34 at Helezon.FollowMe.Service.CompanyImageService.Update(CompanyImage entity) in C:\Users\isa\source\repos\Helezon.FollowMe\Helezon.FollowMe.Service\CompanyImageService.cs:line 59 at Helezon.FollowMe.Service.CompanyImageService.DeleteByImageName(String imageName) in C:\Users\isa\source\repos\Helezon.FollowMe\Helezon.FollowMe.Service\CompanyImageService.cs:line 78 at Helezon.FollowMe.WebUI.Controllers.FileUploadController.DeleteFile(String file, String entitytype) in C:\Users\isa\source\repos\Helezon.FollowMe\Helezon.FollowMe.WebUI\Controllers\FileUploadController.cs:line 154 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass3_6.1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<>c.1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<>c.1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<>c.1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)