An alternative to a public static validator is to use model validation.
That would require modifying the Amenity model to use System.ComponentModel.DataAnnotations with annotation like [required] before critical fields. Then add the [ValidateModel] annotation to any controllers that need it.
This document give a nice overview of model validation.
An alternative to a public static validator is to use model validation.
That would require modifying the Amenity model to use System.ComponentModel.DataAnnotations with annotation like [required] before critical fields. Then add the [ValidateModel] annotation to any controllers that need it.
This document give a nice overview of model validation.