Home Tags Privacy About

All posts tagged with "C#"

C# (C-sharp) is a general-purpose programming language using strong typing, It was developed around 2000 by Microsoft and used on the .Net platform.

← Newer Posts Page 4 of 13 Older Posts →

C# Dapper - How to use transactions with Dapper

Dapper is a micro ORM or a simple object mapper and it integrates smoothly with C# and its SqlConnection. The same applies to Dapper and transactions »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Dapper 28 August 2022

C# Dapper - How to call a stored procedure with a parameter

This post shows you how to call a stored procedure with a parameter using Dapper. If we have the following table with an Id (int) and »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Dapper, MSSQL 28 August 2022

C# HttpClient - How to send a Delete request with or without a body

Using the HttpRequestMessage together with the HttpClient you can easily send a HTTP Delete request in C#. Below we have a delete endpoint on https://localhost: »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, HttpClient 27 August 2022

ASP.NET - How to make a controller endpoint for a HTTP Delete request

Like with HttpGet HttpPut or HttpPost attributes there is a respective attribute for the HTTP Delete Method - HttpDelete. You can add this attribute to get »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 25 August 2022

C# - How to return a completed Task with or without a result

When using tasks you at some point come across having to return a Task without actually having a Task to return. The usual case is in »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Tasks and threads 24 August 2022

C# - The difference between System.Tuple and System.ValueTuple

Prior to C# 7, the only type of tuple was the System.Tuple class. This type of Tuple is an immutable class (reference type) and a »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 02 August 2022

C# - CS8803 Top-level statements must precede namespace and type declarations

Earlier I was putting some code together for an example. I got the following error (Top-level statements must precede namespace and type declarations): Error CS8803 Top-level »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 01 August 2022

C# - How to get a list from a JSON string using SelectToken without having to parse the whole structure

Often when working with JSON you would parse it to a C# object structure that matches your JSON. But sometimes you may want only a subset »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 02 July 2022

C# HttpClient - How to set the Content-Type header for a request

This post describes how to make a HTTP request with a specific content-type using the HttpClient in C#. Using the HttpClient you can POST JSON or »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, HttpClient 26 June 2022

C# Dapper - How to execute a select statement using a list of Ids with an IN clause in MSSQL

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 »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Dapper, MSSQL 17 June 2022
← Newer Posts Page 4 of 13 Older Posts →
  • Rss
  • Twitter
  • LinkedIn
  • profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2025 Privacy policy