Specification icon indicating copy to clipboard operation
Specification copied to clipboard

Why do the Update and Delete not returning anything?

Open FaridAhamat opened this issue 1 year ago • 3 comments

Looking at here, RepositoryBaseOfT class:

image

Considering that the SaveChangesAsync function actually returns something, why does the Update and Delete operation not return that value?

This is not really a show stopper for me since I can always override that class and copy the same implementation, but I'm just curious if there's any reason why this is made this way?

FaridAhamat avatar Aug 10 '23 09:08 FaridAhamat

Hey @FaridAhamat

Thanks for the feedback. Yes, we might return something. No one complained until now, so it has remained that way. But, the question would be what to return. Should we return entities back for Update or the affected rows?

Let's keep this issue open for a while and wait for feedback from the community. Once we have a consensus on what to return, then sure we'll change it.

fiseni avatar Aug 10 '23 11:08 fiseni

Personally, I prefer to return whatever the dbContext returns. But let's hear if anyone else have other opinions

FaridAhamat avatar Aug 12 '23 23:08 FaridAhamat

Should return same entity

learnwithkawsar avatar Sep 10 '23 17:09 learnwithkawsar