Search Results for

    Show / Hide Table of Contents

    Intent.Blazor.HttpClients.Dtos.DataAnnotations

    This Intent Architect module adds attributes to properties of inbound DTOs/Commands generated by the Intent.Blazor.HttpClients module.

    For each property, it will add all the appropriate attributes that it can from the System.ComponentModel.DataAnnotations namespace based on any Validation Rules applied to the field in the Services designer as well as any implicit/inferred validation rules which may be applicable.

        public class AggregateRootDto
        {
            public Guid Id { get; set; }
    +       [Required(ErrorMessage = "Aggregate attr is required.")]
            public string AggregateAttr { get; set; }
    +       [Required(ErrorMessage = "Composites is required.")]
            public List<AggregateRootCompositeManyBDto> Composites { get; set; }
            public AggregateRootCompositeSingleADto? Composite { get; set; }
            public AggregateRootAggregateSingleCDto? Aggregate { get; set; }
    +       [Required(ErrorMessage = "Enum type 1 is required.")]
            public EnumWithoutValues EnumType1 { get; set; }
    +       [Required(ErrorMessage = "Enum type 2 is required.")]
            public EnumWithDefaultLiteral EnumType2 { get; set; }
    +       [Required(ErrorMessage = "Enum type 3 is required.")]
            public EnumWithoutDefaultLiteral EnumType3 { get; set; }
        }
    
    • Edit this page
    ☀
    ☾
    In this article
    Back to top Copyright © 2017-, Intent Software Pte Ltd.