ilovedotnet WhatsApp Channel

ilovedotnet

312 subscribers

About ilovedotnet

Hey folks Welcome to ilovedotnet and thank you for joining https://ilovedotnet.org - .NET knowledge sharing and learning platform. I'll be sharing content in this channel every Sunday. I'll be making announcements on new features that will be coming to ilovedotnet. I'll be exclusively sharing content here on my new learnings. Follow me on LinkedIn https://LinkedIn.com/in/thebhai and share your feedbacks. Thanks & Regards, Bhai

Similar Channels

Swipe to see more

Posts

ilovedotnet
ilovedotnet
2/2/2025, 6:55:49 AM

Git Pre-commit hooks execute before a commit is made and can enforce coding standards, format code or run tests and enforce code coverage. Automating the setup of these hooks ensures consistency across a team, removing the need for manual configuration. This makes maintaining standards across different developer machines especially in large teams. In this article, we'll explore how to automate the setup of a pre-commit hook in a .NET project using MSBuild. Check out https://ilovedotnet.org/blogs/automating-git-hook-setup-in-dotnet-with-msbuild for more details and code samples

ilovedotnet
ilovedotnet
2/9/2025, 5:20:02 PM

FluentAssertions Went Paid. What Did I Do? I Migrated 1000+ Tests in Seconds! January 2025 started with a surprise—FluentAssertions, the popular free assertion library for .NET, is now paid. At $130 per developer, our enterprise (1000+ devs) decided it wasn’t worth the cost. That’s when I had a realization: 💡 Over a decade, I had unknowingly introduced technical debt by relying on FluentAssertions in every project I worked on. So, I took action. I wanted a fast, automated way to migrate every test to xUnit assertions. First, I tried LLMs (Ollama)—worked for a single assertion but became slow for large-scale repo migration. Then, I switched to Regex. ⚡ Boom! In seconds, my entire repo (1000+ test methods) was converted. ✅ 90%+ automated conversion ✅ Manual cleanup took just an hour ✅ Now, we’re FluentAssertions-free Lesson learned: Choose dependencies wisely. Even the best free tools can turn paid. If you’ve been using FluentAssertions, it’s time to rethink. Would you pay $130 per dev or migrate? Let me know your thoughts! 👇💬 Check https://ilovedotnet.org/blogs/using-regex-to-migrate-from-fluent-assertions-to-xunit-assertions for idea and code sample!!

👍 2
ilovedotnet
ilovedotnet
2/16/2025, 9:12:06 AM

Ever wondered how to add new behavior to existing classes without modifying them? 🤔 Learn the Visitor Pattern—one of the most powerful design patterns in object-oriented programming. Why should you care? ✅ Helps keep your core classes clean ✨ ✅ Enables adding operations without modifying existing code 🔥 ✅ Follows the Open-Closed Principle (OCP) in SOLID Here’s a simple analogy: Imagine you own a mall 🏬. Customers (elements) visit the mall, and different staff members perform different tasks: Security checks the customer’s ID 🛂 Sales staff offer discounts 🏷 Customer service gathers feedback 💬 Each staff member is like a Visitor, performing a specific operation without changing the customer! 🎯 Check out https://ilovedotnet.org/blogs/behavioral-design-pattern-visitor/ for code samples and in browser demo.

❤️ 👍 3
ilovedotnet
ilovedotnet
2/23/2025, 4:16:32 PM

🚀 Adding a distributed lock to Hosted Background Service in ASP.NET WEB API 🔹 What? We needed to query AWS Athena every hour to fetch analytics data for a dashboard. Running it as a background service worked, but multiple API instances triggered duplicate queries, causing AWS rate limits. 🔹 Why? Errors and warnings skyrocketed, increasing costs and inefficiency. The challenge worsened when the query frequency was reduced to 30 minutes. 🔹 How? We implemented a distributed lock using a database table, ensuring only one instance runs the job at a time. This reduced rate limits, improved reliability, and optimized costs. Check out https://ilovedotnet.org/blogs/using-a-distributed-lock-in-hosted-service-in-asp-net-webapi/ for more visuals and code samples.

❤️ 👍 4
Link copied to clipboard!