George Benson

George Benson

  • NA
  • 69
  • 478

Date validation against data table

Feb 3 2019 8:33 AM
i am re-writing a reservation system in MVC5 using C#.  New to both.  in the DB i have a table of blackout dates. the site owner enters records in the blackout table to exclude them from selection by the visitor.
 
structure
id
startdate
enddate 
 
use case (currently)
visitor enters their arrival date
system returns the count of the entered date being between an any of the  start and end dates in the blackout table and returns validation message if the count is > 0
 
 what is the best approach to creating this validation routine in the MVC create form?
TIA 

Answers (2)