Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert called even in update and delete methods #21

Closed
noufionline opened this issue Mar 15, 2018 · 2 comments
Closed

Insert called even in update and delete methods #21

noufionline opened this issue Mar 15, 2018 · 2 comments

Comments

@noufionline
Copy link

Hi there,

I am a bit confused here.

In your repository code

 public virtual void Insert(TEntity item)
            => Context.Entry(item).State = EntityState.Added;

and at the same time in the Trackable Code

 public override void Insert(TEntity item)
        {
            item.TrackingState = TrackingState.Added;
            base.Insert(item);
        }

        public override void Update(TEntity item)
        {
            item.TrackingState = TrackingState.Modified;
            base.Insert(item);
        }

        public override void Delete(TEntity item)
        {
            item.TrackingState = TrackingState.Deleted;
            base.Insert(item);
        }

Even for Delete and Update methods Insert is called.

@celestialtek
Copy link

celestialtek commented Mar 16, 2018

Oh, I had to clone and modified these code, I think author copy & paste in code 💃. Please Fix in source with match methods

@lelong37
Copy link
Member

There was a PR that issued with a minor refactor, and there was a bug that was introduced during the merge, this has been hot-fixed, released and URF.Core NuGet Packages RC1 has been released with the hot-fix and live demo has been redployed with RC1 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants