ilovedotnet WhatsApp Channel

ilovedotnet

351 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
5/25/2025, 10:35:07 AM

๐Ÿง  How do you add new logic in .NET โ€” without touching existing code? This blog breaks down the Open/Closed Principle (OCP) with a tax calculation example in C#. โœ… Add new business rules and logics โœ… Keep current logic untouched โœ… Use DI + Factory + Interface combo Less regressions. More testability. Cleaner code. ๐Ÿ”— Read now: https://ilovedotnet.org/blogs/open-closed-principle-in-solid

๐Ÿ‘ 1
ilovedotnet
ilovedotnet
6/1/2025, 10:15:32 AM

Is your repository interface violating SOLID? If you're forcing consumers to depend on unused methods, you're breaking the Interface Segregation Principle. ๐Ÿ’ก In this blog, I show how to fix it by splitting IGenericRepository<T> into: IReadableRepository<T> ๐Ÿ“– IWritableRepository<T> โœ๏ธ โœ… Cleaner code โœ… Lower coupling โœ… Easier testing ๐Ÿ”— Read the full blog: https://ilovedotnet.org/blogs/interface-segregation-principle-in-solid/

๐Ÿ‘ 1
ilovedotnet
ilovedotnet
6/8/2025, 2:05:20 PM

โœ๏ธ Automate your Git commit messages with AI! I use GitHub Copilot plus prompt engineering to create detailed, context-rich commit messages without extra effort. Learn how to set this up inside VS Code with practical prompt templates. Check out the blog for exact prompt examples and setup tips. Read more: ๐Ÿ”— https://ilovedotnet.org/blogs/using-github-copilot-ai-for-commit-message-generation/

๐Ÿ‘ 1
ilovedotnet
ilovedotnet
6/15/2025, 2:32:06 PM

Still drawing diagrams manually? Let Copilot Chat do it for you ๐Ÿง  In this blog, see how to: ๐ŸŸฃ Use natural language prompts ๐ŸŸฃ Generate diagrams with MermaidJS ๐ŸŸฃ Skip the drag-drop tools Perfect for system design and fast documentation. Even better โ€” real examples and workflow ideas included. ๐Ÿ”— Read the full post: https://ilovedotnet.org/blogs/using-github-copilot-ai-for-architecture-diagram-generation/

๐Ÿ‘ 1
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!