20 lines
575 B
C#
20 lines
575 B
C#
namespace MVC_SimpleCRUD_Layered.Application.People;
|
|
|
|
public record DeletePersonResult(bool Found, bool Success, string? PersonName, string? ErrorMessage)
|
|
{
|
|
public static DeletePersonResult NotFound()
|
|
{
|
|
return new DeletePersonResult(false, false, null, null);
|
|
}
|
|
|
|
public static DeletePersonResult Deleted(string personName)
|
|
{
|
|
return new DeletePersonResult(true, true, personName, null);
|
|
}
|
|
|
|
public static DeletePersonResult Failed(string personName, string errorMessage)
|
|
{
|
|
return new DeletePersonResult(true, false, personName, errorMessage);
|
|
}
|
|
}
|