using System; using System.Collections.Generic; using System.Linq; namespace UnivateProperties_API.Containers { public class ValidateEntity { public ValidateEntity() { Errors = new List(); } public ValidationResult Result { get { return (Errors == null || Errors.Count() == 0) ? ValidationResult.Success : ValidationResult.Failed; } } public string ResultString { get { string message = string.Empty; foreach(var item in Errors) { message += $"{item} {Environment.NewLine}"; } return message; } } public List Errors { get; set; } } }