MVC (layered variant)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user