laatzen/LaaProductionWeb/LaaProductionWeb.Services/Models/HttpResponseModel.cs
2023-05-03 08:21:21 +02:00

24 lines
543 B
C#

namespace LaaProductionWeb.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();
}
}
}