← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 113
  1. With the release of .NET 10 just around the corner (next month!)

  2. Writing this mostly for future me in case I need it again.

  3. Cloudflare Workers Cloudflare Workers is a serverless environment that runs Javascript.

  4. My blog has been a bit quiet in the last 18 months or so, because, well, life happened… In that time span I became a father, changed jobs twice, and relocated to Canada with my family, so free time has been scarce.

  5. I maintain a few libraries that still target .NET Framework 4.5 (among others). .NET 4.5 has long been out of support, but I try to keep supporting older frameworks in my libraries as long as it’s not a major inconvenience, because many people maintain old

  6. A quick review of C# 10 new language features

    .NET 6.0 and C# 10 are just around the corner, so now is a good time to review some of the most interesting new language features!

  7. We’re reaching the end of this series on records as strongly-typed ids.

  8. So far in this series, I showed how to use C# 9 records to declare strongly-typed ids as easily as this: public record ProductId(int Value) : StronglyTypedId<int>(Value); I also explained how to make them work correctly with ASP.NET Core model binding and…

  9. In the previous post in this series, we noticed that the strongly-typed id was serialized to JSON in an unexpected way: { "id": { "value": 1 }, "name": "Apple", "unitPrice": 0.8 } When you think about it, it’s not really unexpected: the strongly-typed id…

  10. Last time, I explained how easy it is to use C# 9 record types as strongly-typed ids: public record ProductId(int Value); But unfortunately, we’re not quite done yet: there are a few issues to fix before our strongly-typed ids are really usable.

  11. Using C# 9 records as strongly-typed ids

    Strongly-typed ids Entities typically have integer, GUID or string ids, because those types are supported directly by databases.

  12. Dependency injection: the good and the bad Dependency injection (DI) is a great pattern, which can really help make your code cleaner, more decoupled and more testable.

  13. Introducing Cosmos DB Studio

    I’ve been using Azure Cosmos DB on a fairly regular basis for the last 2 years or so.

  14. Most JSON converters are fairly simple, and typically self-contained.

  15. ASP.NET Core 3, IIS and empty HTTP headers

    HTTP headers are key/value pairs sent at the beginning of a request or response.

  16. Sometimes your API needs to expose a non-primitive type that has a “natural” string representation.

  17. Oh no, you just accidentally commited to master, when you were supposed to work on a feature branch!

  18. Exciting new features in C# 9

    Last week at Microsoft Build, there have been a lot of exciting annoucements!

  19. As a C# developer, there are obviously a lot of skills you need to master to be effective: language syntax, framework classes, third-party libraries, databases, regular expressions, the HTTP protocol, etc.

  20. Moving my blog to Hugo

    If you’re a regular reader of my blog, you probably noticed that the design has changed.

  21. About

    I’m Thomas Levesque, a French software developer from Paris.

  22. Over the last few years, OpenID Connect has become one of the most common ways to authenticate users in a web application.

  23. The problem with circular dependencies When building an application, good design dictates that you should avoid circular dependencies between your services.

  24. Query strings are typically made of a sequence of key-value pairs, like ?

  25. Out of the box, ASP.NET Core has the concept of “environments”, which allows your app to use different settings based on which environment it’s running in.

  26. A few years ago, I blogged about a way to automate unit testing of null argument validation.

  27. Using foreach with index in C#

    Just a quick tip today!

  28. Handling type hierarchies in Cosmos DB (part 2)

    This is the second post in a series of 2: Handling type hierarchies in Cosmos DB (part 1) Handling type hierarchies in Cosmos DB (part 2) (this post) In the previous post, I talked about the difficulty of handling type hierarchies in Cosmos DB, showed that

  29. Handling type hierarchies in Cosmos DB (part 1)

    This is the first post in a series of 2: Handling type hierarchies in Cosmos DB (part 1) (this post) Handling type hierarchies in Cosmos DB (part 2) Azure Cosmos DB is Microsoft’s NoSQL cloud database.

  30. Disclaimer: I am by no mean a TypeScript expert.

  31. ASP.NET Core SignalR is a super easy way to establish two-way communication between an ASP.NET Core app and its clients, using WebSockets, Server-Sent Events, or long polling, depending on the client’s capabilities.

  32. A few months ago, Google decided to shutdown Google+, due to multiple data leaks.

  33. Update 2021/09/19: If you’re using the newer Microsoft.Identity.Web library, you don’t have anything to do to handle this, as it’s already handled by the library.

  34. Ever since the first stable release of the .NET Core SDK, we’ve enjoyed a better C# project format, often called “SDK-style” because you specify a SDK to use in the project file.

  35. Initialization in ASP.NET Core is a bit awkward.

  36. Suppose we’re writing an API for a blog.

  37. Update: I no longer recommend the approach described in this post.

  38. As you probably know, .NET Core runs on many platforms: Windows, macOS, and many UNIX/Linux variants, whether on x86/x64 architectures or on ARM.

  39. Writing a GitHub Webhook as an Azure Function

    I recently experimented with Azure Functions and GitHub apps, and I wanted to share what I learned.

  40. Middlewhat?

  41. Cleanup Git history to remove unwanted files

    I recently had to work with a Git repository whose modifications needed to be ported to another repo.

  42. Better timeout handling with HttpClient

    The problem If you often use HttpClient to call REST APIs or to transfer files, you may have been annoyed by the way this class handles request timeout.

  43. T4 (Text Template Transformation Toolkit) is a great tool to generate code at design time; you can, for instance, create POCO classes from database tables, generate repetitive code, etc.

  44. To be honest, I never really liked MSBuild until recently.

  45. Testing and debugging library code from LINQPad

    I’ve been meaning to blog about LINQPad in a very long time.

  46. Linq performance improvements in .NET Core

    By now, you’re probably aware that Microsoft released an open-source and cross-platform version of the .NET platform: .NET Core.

  47. Easy text parsing in C# with Sprache

    A few days ago, I discovered a little gem: Sprache.

  48. What's new in FakeItEasy 3.0.0?

    FakeItEasy is a popular mocking framework for .NET, with an very intuitive and easy-to-use API.

  49. C# methods in git diff hunk headers

    If you use git on the command line, you may have noticed that diff hunks often show the method signature in the hunk header (the line that starts with @@), like this: diff --git a/Program.cs b/Program.cs index 655a213..5ae1016 100644 --- a/Program.cs +++…

  50. Fun with the HttpClient pipeline

    A few years ago, Microsoft introduced the HttpClient class as a modern alternative to HttpWebRequest to make web requests from .NET apps.