Best of .NET — April 2024
- 1
- 2
- 3
- 4
- 5
- 6
- 7
Code Maze·2y
Using Server-Sent Events for Realtime Updates in ASP.NET Core
Learn about Server-Sent Events in ASP.NET Core, including what they are, their features, and how they work. Discover the differences between Server-Sent Events and WebSockets. Implement Server-Sent Events in a simple ASP.NET Core Web API for real-time updates.
- 8
- 9
Lobsters·2yPowerShell: the object-oriented shell you didn’t know you needed
Learn about PowerShell, an object-oriented shell and scripting language from Microsoft that is powerful, versatile, and has unique features compared to standard Unix shells. Topics covered include differences between Windows PowerShell and PowerShell Core, working with files and directories, finding duplicates, using .NET classes and COM objects, launching Internet Explorer, and customizing the PowerShell prompt.
- 10
- 11
- 12
- 13
- 14
- 15
Milan Jovanović·2y
A Clever Way To Implement Pessimistic Locking in EF Core
Learn how to implement pessimistic locking in EF Core using raw SQL queries. See how to handle concurrent requests in high-traffic scenarios and avoid overbooking. Understand the flavors of locking and when to use them. Consider the benefits and drawbacks of pessimistic locking versus serializable transactions.
- 16
- 17
- 18
Code Maze·2y
How to Validate a GUID in C#
Explore several approaches to validate a string representation of a GUID in C#. Learn about the format of a GUID and different techniques like regular expressions, Guid.Parse(), Guid.ParseExact(), Guid.TryParse(), and the Guid constructor for validation. Benchmarking results show that Guid.TryParse() methods offer better performance and efficiency.
- 19
- 20
Code Maze·2y
Fastest Way to Find and Extract a Number From a String in C#
Explore the quickest method to find and extract a number from a string in C#. Implement techniques using regular expressions, LINQ, StringBuilder, and Span. Performance comparison shows the advantage of using Span with the lowest memory allocation.
- 21
- 22
- 23