NimblePros Blog - Page 21

  1. NimblePros Blog
    December 12, 2022

    AssertConfigurationIsValid skips ReverseMap configurations in AutoMapper. Fix it with two distinct mappings or ValidateMemberList, and know when to use each.

  2. NimblePros Blog
    October 03, 2022

    C# structs can skip your constructor through default values, so preconditions you enforce there may never run. Here's why structs and classes behave …

  3. NimblePros Blog
    September 23, 2022

    Enhance the readability of your tests by customizing Fluent Assertions to your use cases!

  4. NimblePros Blog
    September 13, 2022

    AutoMapper lets you map a type to itself without creating a map, but it returns the same instance instead of a copy. Here's how to force a real copy and test …

  5. NimblePros Blog
    September 06, 2022

    Thinking in relational tables leads to awkward wrapper entities in DDD models. A modeling kata shows why a document database can be a better fit for DDD …

  6. NimblePros Blog
    August 23, 2022

    How to make sure you are comparing apples to apples when benchmarking in .NET

  7. NimblePros Blog
    August 23, 2022

    C# has no built-in string repeat function. Compare four ways to repeat a string N times, with LINQ, StringBuilder, arrays, and Span, plus benchmark results.

  8. NimblePros Blog
    August 23, 2022

    Convert Results from one type to another using the new Map extension method!

  9. NimblePros Blog
    August 18, 2022

    Set up a .NET benchmarking project from scratch with BenchmarkDotNet, using its attributes and APIs to compare the performance of string concatenation methods.

  10. NimblePros Blog
    August 16, 2022

    AutoMapper maps are easy to unit test. Use AssertConfigurationIsValid, regression tests, and a reusable base test class to verify mappings with less …