Validating handles

Rated 4.79/5 based on 715 customer reviews

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.

Leave a Reply

  1. Hind xxx 07-Sep-2020 01:33

    USA guest chat rooms is a place to meet strangers from USA.

  2. Sex chat sites no registrating 29-Oct-2020 13:44

    On the other hand, if your desire is to round out the great fitness training you already provide by learning how to help clients build a well-balanced dietary foundation, the Fitness Nutrition Specialist program might be right for you.