using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CPRNIMS.Domain.Services { public class Result { public bool IsSuccess { get; set; } public string? Error { get; set; } public T? Value { get; set; } private Result(bool isSuccess, T? value, string? error) { IsSuccess = isSuccess; Error = error; Value = value; } public static Result Success(T value) => new Result(true, value, null); public static Result Failure(string? error) => new Result(false, default, error); } }