update to use get-init instead of input parameter
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
namespace Leanetec.EConnect.Domain.Entities;
|
||||
using System.Net;
|
||||
|
||||
public record Response<TError>(bool Ok, TError? Error = null) where TError : class;
|
||||
namespace Leanetec.EConnect.Domain.Entities;
|
||||
|
||||
public record Response<TData, TError>(bool Ok, TData? Data = null, TError? Error = null) where TData : class where TError : class;
|
||||
public record Response<TError>() where TError : class
|
||||
{
|
||||
public bool Ok { get; init; }
|
||||
|
||||
public HttpStatusCode? StatusCode { get; init; }
|
||||
|
||||
public TError? Error { get; init; }
|
||||
}
|
||||
|
||||
public record Response<TData, TError> : Response<TError> where TData : class where TError : class
|
||||
{
|
||||
public TData? Data { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user