15 lines
395 B
C#
15 lines
395 B
C#
namespace MVC_SimpleCRUD_Layered.Application.People;
|
|
|
|
public record SavePersonResult(bool Success, string? PersonName, string? ErrorMessage)
|
|
{
|
|
public static SavePersonResult Ok(string personName)
|
|
{
|
|
return new SavePersonResult(true, personName, null);
|
|
}
|
|
|
|
public static SavePersonResult Failed(string errorMessage)
|
|
{
|
|
return new SavePersonResult(false, null, errorMessage);
|
|
}
|
|
}
|