iammukeshm / AspNetCoreHero-Boilerplate

ASP.NET CORE HERO - Boilerplate template for your next project!
MIT License
180 stars 48 forks source link

Validation #9

Open krasni opened 4 years ago

krasni commented 4 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Hello, Currently project is not implementing validation. After adding this line to AddApplicationLayer:

services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehaviour<,>));

project is raising error if new product specification is not satisfied:

if (failures.Count != 0) throw new Exceptions.ValidationException(failures);

How can I send these errors to user to be shown in new product form?

Thank you very much.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.