0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-07-03 20:12:56 +00:00
CleanArchitecture/CleanArchitecture.Domain/Commands/Tenants/CreateTenant/CreateTenantCommand.cs
2023-08-28 19:41:49 +02:00

21 lines
515 B
C#

using System;
namespace CleanArchitecture.Domain.Commands.Tenants.CreateTenant;
public sealed class CreateTenantCommand : CommandBase
{
private static readonly CreateTenantCommandValidation s_validation = new();
public string Name { get; }
public CreateTenantCommand(Guid tenantId, string name) : base(tenantId)
{
Name = name;
}
public override bool IsValid()
{
ValidationResult = s_validation.Validate(this);
return ValidationResult.IsValid;
}
}