Q: Best approach to validate each row in the database (performance concern) I have a form that allows user to add multiple rows and when user type an input into each row I have to validate that the value is in the database.  For example, a user adding order number to each row and need to validate that the order number exist in the DB before adding another row.
It might me too costly to make a trip to the database each time the user add a row to the form.
What is a good way to approach this concern?
ASP.NET Core, MSSQL DB

A: Taking your example of order number existent in the DB. Why don't you have a model populate with Order numbers and you can check in the Model for any previous data and if there isn't any you can add new data in the DB.
