• Coding

    Blazor + HTML minification

    Blazor tracks local state through HTML comments. HTML minification should exclude Blazor: comments to avoid rendering the application unusable.

  • Coding

    Async locking

    Async by design may not resume on its original thread which can result in deadlocks. Locking needs to occur through a shared resource, a semaphore.

  • Coding

    LINQ .Distinct on ordered results

    If you've noticed that your ordered results become unordered after materializing with .Distrinct(), give .GroupBy() a try.

  • Coding

    WebApi [FromBody]

    Web Api's [FromBody] seems to confuse a lot of developers. By default Web Api will only look for primitve types (string, int, etc) in the uri.

    For actions using primitive types in the body such as Post(int userId) we must tell the Web Api binder to look at the body of the request, not the uri, by decorating arguments with [FromBody].

An error has occurred. This application may no longer respond until reloaded. Reload 🗙