Skip to content

use model validation for Amenities model #131

Description

@LeeroyDilim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions