The method returns the IStatus Generic interface I use in my libiraries.
This contains either a success message if there were no errors, or a list of errors if problems were found.
The Generic Services is a bit more complex, as by default it doesn’t validate on saving to the database, so your error handler won’t be called.
You can turn on validation on a case-by-case via the Per Dto Config As I said earlier one of my users of the Generic Services library wanted to know if Generic Services could handle concurrency issues, and I had to say no.
This is why my Generic Biz Runner library defaults to validating the data on save, while my Generic Services library, which works with the front-end CRUD (Create/Read/Update/Delete) accesses, defaults to not validating the data.The problem with database exception messages is that they aren’t user-friendly, and can reveal something about your database structure (which is a possible security breach), so you can’t show them directly to the user.This article describes how to capture these database exceptions in EF Core and turn them into user-friendly error messages. NET is about checking that the data in a class fits within certain rules.The other thing to note is that the calling method has to return either success, or one or more error messages.For my libraries I wanted to generalise the approach to cover both a) any type of exception, b) any type of databases.