update to use get-init instead of input parameter

This commit is contained in:
2025-08-15 15:03:42 +02:00
parent 4bb6a6cf18
commit ad9f7ef7e4
2 changed files with 39 additions and 7 deletions

View File

@@ -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; }
}