50 Things You've Been Doing Wrong in C# and .NET Core

Video description

Professional software development involves many different skills. As a C# developer, you must be skilled in the C# language and the .NET Core runtime. With this course, you'll take your C# and .NET Core skills to the next level by avoiding common mistakes when coding, using design patterns, developing microservices, persisting your data, securing your application, and even debugging problems.

Learning the basics of a language or platform can easily be done by following a course/book and with some hands-on practice. The path to becoming a software developer encounters many edge cases. During this course, you'll learn from my hard-earned experience, garnered from real-life situations, regarding the C# language and .NET platform. You can take this course as a vaccination against future coding infections!

By the time you finish this course, you will have developed your skills to "sniff out" coding issues effectively and avoid mistakes. Whatever your issues, the aim of this course is to take you to the 'Bring it on!' point when it comes to solving your .NET and C# problems.

Please note that this course assumes familiarity with C#, .NET Core, and ASP.NET Core, together with Visual Studio (2017 or 2019).

What You Will Learn

  • Deeply understand popular data structures (such as lists, arrays, LinkedList, HashSet, and dictionaries) and use the most efficient one depending on the problem you are trying to solve
  • Persist your data to a database properly by learning about efficiency and concurrency aspects when using the Entity framework
  • How to use HTTP verbs, and HttpClient properly, and classify your resources appropriately
  • Why circular dependencies are bad and how to avoid chatty traffic, eventually leading to more robust microservices
  • How to use SOLID principles the right way with improved code quality and readability
  • Identify and fix common programming problems with proven design patterns
  • Effectively debug, design, and secure your code
  • Navigate the complicated world of microservices and deliver robust RESTful APIs that follow the best industry standards


Beginners, experts, and anyone familiar with C#, .NET Core, and ASP.NET Core who would like to learn the best ways to do things in .NET Core and related tools will learn something new and benefit from this course.

About The Author

Onur Gumus: Onur Gumus works as a lead software engineer in Dubai UAE. He has 15 years of experience in .NET and web development. He is a functional programming enthusiast and has completed many large projects with ASP.NET.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Resolving General C# Coding Errors
    1. The Course Overview
    2. Misunderstanding Pass by Reference
    3. Misunderstanding Dispose and Garbage Collector Relation
    4. Incorrectly Implementing Equals and GetHashCode
    5. Handling Exceptions Correctly
    6. Misunderstanding Virtual and Override
    7. Ignoring Compiler Warnings
  2. Chapter 2 : Misusing C# Primitives
    1. Misusing DateTime
    2. String and Localization Mistakes
    3. Issues with int and long
    4. Issues with float, double, and decimal.
    5. Misusing Structs and Boxing Mistakes
  3. Chapter 3 : Design Patterns and SOLID
    1. Misunderstanding and Violating SOLID Principles
    2. Changing Your Core Logic
    3. Not Using Design Patterns When You Should
    4. Incorrectly Implementing Singleton
  4. Chapter 4 : Data Structures and Algorithms
    1. Using List and Array Everywhere
    2. Using OrderBy Instead of Sort
    3. Using Where Instead of Find
    4. Not Understanding How LINQ Works
  5. Chapter 5 : Parallelism and Asynchronicity
    1. Overusing Threads Instead of Tasks
    2. Not Understanding Thread Safety
    3. Not Being Aware of Fences and Memory Barriers
    4. Not Using Task in Interface Signatures with Potential I/O
    5. Using Result or Wait Inappropriately
  6. Chapter 6 : Dependency Injection
    1. Choosing the Wrong Lifetime
    2. Using the Service Locator Pattern
    3. Injecting Too Many Parameters
    4. Using Dependency Injection Only for Testing
  7. Chapter 7 : Entity Framework
    1. Making Everything Public
    2. Not Using Transactions
    3. Losing Aggregate Boundaries
    4. Ignoring Concurrency
    5. Using Auto-Incremented Primary Keys
  8. Chapter 8 : Building RESTful APIs
    1. Misunderstanding What Resources Are
    2. Using Only POST and GET
    3. Underestimating Caching and Redirection
    4. Using HttpClient Wrongly
  9. Chapter 9 : What to Avoid When Building Microservices
    1. Sharing a Database Between Microservices
    2. Having Chatty Traffic
    3. Ignoring Latency Concerns
    4. Having Cyclic Dependencies
  10. Chapter 10 : Security Flaws
    1. Not Properly Hashing Passwords
    2. Misusing Cookies
    3. Not Properly Hiding Your Secrets
    4. Relying on Client Validation
    5. SQL Injections
  11. Chapter 11 : Not Knowing About Debugging Tools
    1. Not Being Aware of Visual Studio's Debugging Abilities
    2. Not Using Fiddler to Diagnose HTTP Traffic
    3. Not Using PerfView for Production Issues
    4. Not Using Memory Dumps for Production Issues

Product information

  • Title: 50 Things You've Been Doing Wrong in C# and .NET Core
  • Author(s): Onur Gumus
  • Release date: February 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781789804683