Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 709aa91

Browse files
committed
Fix ErrorResult
1 parent d9ec84f commit 709aa91

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/NET6CustomLibrary/Errors/ErrorResult.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
namespace NET6CustomLibrary.Errors;
22

3-
public class ErrorResult
3+
public class ErrorResult : IErrorResult
44
{
55
public string TitleCode { get; set; }
66
public HttpStatusCode StatusCode { get; set; }
77
public int TypeCode { get; set; } = 0;
88
public string InstancePath { get; set; }
99
public List<string> Message { get; set; }
1010

11-
public static ErrorResult ResultUnprocessableEntity(List<string> listErrors, HttpContext httpContext)
11+
public ErrorResult ResultUnprocessableEntity(List<string> listErrors, HttpContext httpContext)
1212
{
1313
ErrorResult errorResult = new()
1414
{
@@ -22,7 +22,7 @@ public static ErrorResult ResultUnprocessableEntity(List<string> listErrors, Htt
2222
return errorResult;
2323
}
2424

25-
//public static ErrorResult ResultNotFound(List<string> listErrors, HttpContext httpContext)
25+
//public ErrorResult ResultNotFound(List<string> listErrors, HttpContext httpContext)
2626
//{
2727
// ErrorResult errorResult = new()
2828
// {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace NET6CustomLibrary.Errors;
2+
3+
public interface IErrorResult
4+
{
5+
ErrorResult ResultUnprocessableEntity(List<string> listErrors, HttpContext httpContext);
6+
}

0 commit comments

Comments
 (0)