urfnet / URF.Core

Unit of Work & Repositories Framework - .NET Core, NET Standard, Entity Framework Core. 100% extensible & lightweight.
https://github.com/urfnet
MIT License
309 stars 62 forks source link

Delete on ITrackableRepository #18

Closed ferryferry closed 6 years ago

ferryferry commented 6 years ago

Hi,

Today I was testing with URF.Core..

I created a delete API function to delete a tweet from the database image

After the function has ran, it gives me an "200" Ok response, but when I check the database, the tweet with id 1 is still there.

Am I doing something wrong?

lelong37 commented 6 years ago

@ferryferry we've ran integration tests on our side, and it is successful w/ our tests.

http://localhost:2790/odata/Products(79)

image

Before: image

Debugging:

2018-03-07_6-16-11

After: image

tonysneed commented 6 years ago

@lelong37 Do we call apply changes in the delete method?

tonysneed commented 6 years ago

Now that I think about it, maybe it’s better if we just updated the individual entity stayed here?

lelong37 commented 6 years ago

Absolutely positively, however this was added in the latest release betav2 https://github.com/urfnet/URF.Core/pull/16, hence the request for @ferryferry to double check he's on the latest bits.

lelong37 commented 6 years ago

@ferryferry we've also just updated URF.Sample which has Delete Action https://github.com/urfnet/URF.Core.Sample.

tonysneed commented 6 years ago

Related: #19. Does not address this issue per se, but makes the behavior more consistent.