laatzen/LaaProductionWeb/LaaProduction.Services/Models/HttpResponseModel.cs
2023-06-19 15:43:55 +02:00

24 lines
540 B
C#

namespace LaaProduction.Services.Models
{
using Newtonsoft.Json;
public class HttpResponseModel
{
public bool Succeeded { get; internal set; }
public string Content { get; internal set; }
public string Error { get; internal set; }
public T Deserialize<T>() where T : new ()
{
if (!string.IsNullOrWhiteSpace(this.Content))
{
return JsonConvert.DeserializeObject<T>(this.Content);
}
return new T();
}
}
}