0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-06-29 18:21:08 +00:00
CleanArchitecture/CleanArchitecture.Domain/Commands/Tenants/CreateTenant/CreateTenantCommand.cs
2023-08-30 23:36:48 +02:00

21 lines
507 B
C#

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