FluentCMS icon indicating copy to clipboard operation
FluentCMS copied to clipboard

Should repository's `Delete` method return `Entity` or `bool` or `guid`?

Open pournasserian opened this issue 2 years ago • 2 comments

pournasserian avatar Nov 23 '23 15:11 pournasserian

Returning entity can be useful in cases where the client might need a record of what was deleted.

ParsaGachkar avatar Nov 23 '23 21:11 ParsaGachkar

Most of times we don't need result of DELETE, if returning Entity requires running Database query, It may not be efficient.

I think returning bool or GUID is better.

TheHadiAhmadi avatar Nov 24 '23 12:11 TheHadiAhmadi