.NET core API custom Middleware inside how to db functionalties call? its validation purpose ?
Middleware Db functionalities how to Works?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
.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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaimin ShethiyaRank #177 · 13.7K reputationPosted Apr 18, 2024, 12:00 AM EDT
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