.NET core API custom Middleware inside how to db functionalties call? its validation purpose ?
Loading
.NET core API custom Middleware inside how to db functionalties call? its validation purpose ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaimin ShethiyaPosted Apr 18, 2024, 4:00 AM
Hello Jobin,
for validations you are use the data annotation, and for business validation you need to do the logic in your service and check that logic.
For data annotation refer below links:
https://www.bytehide.com/blog/data-annotations-in-csharp
https://learn.microsoft.com/en-us/ef/ef6/modeling/code-first/data-annotations
https://learn.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/models-data/validation-with-the-data-annotation-validators-cs
https://www.tutorialspoint.com/entity_framework/entity_framework_data_annotations.htm
Thanks