laatzen/LaaProductionWeb/LaaProduction.Services/Models/HttpResponseModel.cs
2024-07-17 13:13:41 +02:00

26 lines
562 B
C#

namespace LaaProduction.Services.Models
{
using Newtonsoft.Json;
using System;
public class HttpResponseModel
{
public Boolean 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();
}
}
}