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