public static TakeThai.Models.ProductModels GetProductModels(int?id = 0) { if (id == null || id <= 0) { return(null); } var searchSubOrder = new TakeThai.Models.SearchOrderModel(); searchSubOrder.OrderId = (int)id; var json = JsonSerializer.Serialize(searchSubOrder); var sendPost = SendPostRequest("Products/GetProduct", json); var convertJsonToModels = new ConvertJsonToModels(); return(convertJsonToModels.ConvertJsonToProductModels(sendPost)); }