HttpResponseMessage apiResponse = null;
apiResponse = await client.SendAsync(message);
var apiContent = await apiResponse.Content.ReadAsStringAsync();
var APIResponse = JsonConvert.DeserializeObject(apiContent);
return APIResponse;
вот как выглядят данные var apiContent
Вот данные var APIResponse.. как вы можете видеть, все равно нулю.

Здесь как выглядит класс APIResponse
public class APIResponse
{
public HttpStatusCode StatusCode { get; set; }
public bool IsSuccess { get; set; } = true;
public List ErrorMessages { get; set; }
public object Result { get; set; }
}
Вот APIRequest
public class APIRequest
{
public ApiType ApiType { get; set; } = ApiType.GET;
public string Url { get; set; }
public object Data { get; set; }
}
Контроллер
public async Task List()
{
BlogPostListModel list = new();
var response = await _blogService.GetAllAsync();
Служба блогов
public Task GetAllAsync()
{
return SendAsync(new APIRequest()
{
ApiType = SD.ApiType.GET,
Url = blogUrl + "/api/Blog/List"
});
}
BlogPostListModel
public class BlogPostListModel : BaseEntityModel
{
public BlogPostListModel()
{
PagingFilteringContext = new BlogPagingFilteringModel();
BlogPost = new List();
}
public BlogPagingFilteringModel PagingFilteringContext { get; set; }
public IList BlogPost { get; set; }
}
Подробнее здесь: https://stackoverflow.com/questions/760 ... hen-return
Мобильная версия