Diving into .NET: From Confusion to Clarity
Tags: csharp, dotnet, beginners, learning
Published: 2024-06-25 18:28:37

Recently, I had a conversation with my mentor, and he opened my eyes to the wealth of opportunities in the .NET industry. Apparently, there's a substantial number of large companies still running legacy code in .NET. Intrigued by this, I decided to dive into the .NET ecosystem. But oh boy, what a ride it has been!
<br/>

## The Initial Struggle

First things first, .NET and C# have been around for quite a while, and the numerous versions released over the years make it challenging to find beginner-friendly resources. I scoured the internet for blogs and tutorials, only to find myself more confused. It felt like navigating through a maze of outdated and fragmented information.
<br/>

## A Lifeline: The .NET Official YouTube Channel

Just when I was about to give up, I stumbled upon the .NET official YouTube channel. The playlists there were a lifesaver:

1. **[C# for Beginners](https://www.youtube.com/playlist?list=PLdo4fOcmZ0oULFjxrOagaERVAMbmG20Xe)**: This series, featuring Scott Hanselman and .NET Distinguished Engineer David Fowler, was a game-changer. They taught C# from the ground up, covering everything from "Hello World" to LINQ. The lessons were delivered at a comfortable pace, making it easy to follow along.

2. **[Back-end Web Development with .NET for Beginners](https://www.youtube.com/playlist?list=PLdo4fOcmZ0oWunQnm3WnZxJrseIw2zSAk)**: Although this course was quite fast-paced, it provided an excellent introduction to ASP.NET. It covered the hosting model, middleware, and dependency injection, along with building HTTP-based services using minimal APIs.

These playlists kickstarted my .NET journey. During the OOP concepts videos, I could reference what was taught in my Master's course, CSE687 - Object-Oriented Design: by Prof. Nadeem Ghani. It was fascinating to see how those principles applied in the C# world.
<br/>

## The API and SQL Challenge

The next hurdle was figuring out how to take the API from the second playlist and integrate it with SQL. I spent over three days sifting through various resources, only to find fragmented and inconsistent information. Was it just my bad luck? Perhaps. But finally, I discovered Sameer Saini's tutorials on YouTube:

1. **[ASP.NET Web API CRUD Operations - .NET8 and Entity Framework Core Tutorial](https://www.youtube.com/watch?v=6YIRKBsRWVI&t=214s)**: This tutorial was instrumental in helping me understand Entity Framework Core and how to perform CRUD operations.

2. **[ASP.NET Authentication using Identity in 10 Minutes - Authentication and Authorization in .NET8](https://www.youtube.com/watch?v=V-S5JZJUvvU)**: This video simplified the concepts of authentication and authorization using Identity in .NET.

These tutorials were a revelation. They introduced me to the awesome packages like Identity.EntityFrameworkCore and others. However, I noticed that many beginner courses leaned towards creating "fat controllers", which is something I wanted to avoid.
<br/>

## Seeking Best Practices (Not Beginner-Friendly)

Coming from a background in developing enterprise-level applications in Java (Spring) and JavaScript (Node.js), I was keen on finding best practices for .NET. This led me to Tim Deschryver's blog, which provided a deeper understanding of efficient project structuring and best practices:

1. **[Maybe it's time to rethink our project structure with .NET 6](https://timdeschryver.dev/blog/maybe-its-time-to-rethink-our-project-structure-with-dot-net-6)**: This post challenged me to rethink how I structure my .NET projects, introducing concepts like vertical slice architecture and modular design.

2.  **[The simplicity of ASP.NET Endpoints](https://timdeschryver.dev/blog/the-simplicity-of-net-endpoints)**: This article offered insights into simplifying ASP.NET endpoints, making the development process more streamlined and efficient.

These blogs were eye-opening and helped me refine my approach to .NET development. The journey from confusion to clarity has been quite the adventure, but with the right resources and guidance, I'm beginning to find my footing in the .NET world.

So, if you're just starting out with .NET, don't be disheartened by the initial chaos. There are excellent resources out there that can guide you through the complexities. Happy coding!

This post is also available on my portfolio, so be sure to check it out at [jayganatra.com](https://jayganatra.com).