26 lines
562 B
C#
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();
|
|
}
|
|
}
|
|
}
|