From 9383a2fb09ffb60cfe63683106945bd688affa59 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 1 Jun 2022 21:13:43 +0200 Subject: feat: Initial commit after clean slate --- src/Data/Results/AppValidationResult.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/Data/Results/AppValidationResult.cs (limited to 'src/Data/Results/AppValidationResult.cs') diff --git a/src/Data/Results/AppValidationResult.cs b/src/Data/Results/AppValidationResult.cs new file mode 100644 index 0000000..0b1c967 --- /dev/null +++ b/src/Data/Results/AppValidationResult.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace VSH.Data.Results; + +public class AppValidationResult +{ + public AppValidationResult() { + Errors = new List(); + } + + public bool IsValid => !Errors.Any(); + public List Errors { get; set; } + + + public class ValidationError + { + public ValidationError(Guid id = default) { + Id = id != default ? id : null; + Errors = new List(); + } + + public Guid? Id { get; set; } + public List Errors { get; set; } + } +} \ No newline at end of file -- cgit v1.3