-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdd-add-shipping-data-service #607
base: 24.2.x
Are you sure you want to change the base?
Conversation
mdd-add-shipping-data-service
public async Task<List<ShippingDataItem>> GetTable() | ||
{ | ||
using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri("https://www.igniteui.com/api/orders", UriKind.RelativeOrAbsolute)); | ||
using HttpResponseMessage response = await _http.SendAsync(request).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why adding "using" statements in code-behind and not just declare them above "namespace Infragistics.Samples" ?
|
||
public ProductDataService(HttpClient http) | ||
{ | ||
_http = http; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why passing HttpClient if you can create it in an constructor of a ShippingDataService?
return new List<ShippingDataItem>(); | ||
} | ||
} | ||
public interface IShippingDataService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this interface really needed?
|
||
public async Task<List<ShippingDataItem>> GetTable() | ||
{ | ||
using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri("https://www.igniteui.com/api/orders", UriKind.RelativeOrAbsolute)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define the Uri as a variable and then pass it to the http request
mdd-add-shipping-data-service