C# - How to send an object as JSON using the HttpClient
In C# You can easily send an object as JSON with a couple of lines of code. In the below we have an object with a »
Using Dapper you can easily map results of a query to an object or a list of objects. Sometimes you want to select a list of »
Dapper makes it easy to "Execute a query and map the results - if any - to a strongly typed List". This post demonstrates »
This post describes two ways to get the generated identity of a newly inserted row. We will use the following table simple table with an Id »
In C# You can easily send an object as JSON with a couple of lines of code. In the below we have an object with a »
One way to deserialize XML is using the DataContractSerializer. You can read XML and deserialize it into an object or serialize an object into XML. If »
A common reason for this error is that you using the wrong type of project output. In Visual Studio try the following and rebuild: * Right click »
I found many examples on how to do this around the internet: * DataContractSerializer Deserialize list not working * How to Deserialize XML using DataContractSerializer * DataContractSerializer Class But »
In Python you can write strings with both single and double quotes. In short you can pick and choose when to use one over the other, »
I have always been told to reuse the HttpClient throughout the application lifetime for better performance and stability. If you search for why, there are quite »
You can set default headers on the HttpClient using the DefaultRequestHeaders property: _httpClient.DefaultRequestHeaders.Add("MyFantasticHeader" ,"MyFantasticValue"); var result = await _httpClient.GetAsync( »