mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-29 18:21:08 +00:00
21 lines
507 B
C#
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 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;
|
|
}
|
|
} |