TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vishal Maitry
NA
11
13k
Unable to cast object of type 'System.Threading.Tasks.Task`1
Jan 24 2015 1:24 AM
public async Task<int> UpdateMediaAppCart(int cartId, int qty, decimal amount, DateTime updatedAt)
{
var client = new HttpClient();
var cartValue = new CartValues
{
CartId = cartId,
Quantity = qty,
Amount = amount,
UpdatedAt = updatedAt
};
var httpContent = new StringContent(JsonConvert.SerializeObject(cartValue), Encoding.UTF8, "application/json");
var result = await client.PutAsync(ConfigurationManager.AppSettings.Get("WebServiceUrl") + "/cart/update", httpContent);
return Convert.ToInt32(result.Content.ReadAsStringAsync());
}
Reply
Answers (
1
)
Regarding DateTime
Html code readablity