Best way to understand Repository Pattern : Understanding and Implementing the Repository Pattern in .NET https://lnkd.in/eWYWddtq
Amit Halder - AzureCloud - eCommerce’s Post
More Relevant Posts
-
In modern #dotnet applications, #dependencyinjection is a fundamental design pattern that promotes loose coupling and enhances maintainability. At the center of .NET’s dependency injection system lies the #IServiceProvider interface, which acts as a service locator for retrieving service instances. Understanding how to obtain and work with an IServiceProvider instance is vital for developers who want to leverage the full power of dependency injection in their applications. In this article, we’ll explore various methods to get an instance of IServiceProvider in .NET in different situations where this might be necessary.
How to Get an Instance of IServiceProvider in .NET - Code Maze
https://code-maze.com
To view or add a comment, sign in
-
Confession: I've recently reinvented the wheel. I got the task of parsing and importing the CSV file. I thought to myself: How hard can it be? It's just a bunch of strings separated by a comma, right? Use something like csvLine .Split(","); and you are done. Well, not exactly. The first problem you will encounter is when a value contains a comma. That string is wrapped into quotes to indicate a single value. If you continue down this path, you will spend more time on edge cases than on other valuable work. Luckily, .NET has a built-in solution. TextFieldParser. The namespace is Microsoft .VisualBasic .FileIO, but it works in C#. (Trust me. I've tested it on my machine.) Don't reinvent solutions that already exist. Value and protect your time. It's the only asset you can't buy. *** P.S. Lack of simplicity, not lack of time, is a true enemy in every C# project. ❌ Big classes. ❌ Poorly written business logic. ❌ Over-engineered software architecture. Inside my newsletter, you get tools, strategies, and systems to eliminate code complexity. (based on my 12 years of experience) Come join 1783 developers here: https://lnkd.in/djSGihGa
To view or add a comment, sign in
-
In my last article, I talked about maintaining a lean architecture in .NET Core applications using vertical slices and the efficient handling of data structures. This involves keeping the domain free of technical concerns and focusing on creating robust, secure, scalable, and most importantly, useful solutions. By emphasizing business value, we can prevent over-engineering. The advantages of encapsulating functions in small, manageable units through the use of Vertical Slices. This naturally leads to high cohesion and low coupling and supports Command Query Separation (CQS). By keeping read and write operations separate, we can improve code organization and maintainability. To illustrate this, I will present a practical example of using the EntityTypeBuilder in EF Core to configure entity mappings. This keeps the domain models free of persistence issues, avoids unnecessary mappers, and allows the domain to focus solely on the business logic. The persistence concern, on the other hand, manages database interactions. By following these principles, I strive to build .NET Core applications that are not just easy to maintain and extend, but also align with business objectives, thereby delivering more value to users and stakeholders. Read my article here: https://lnkd.in/eywwYCeV #programming #softwarearchitecture #leanarchitecture
To view or add a comment, sign in
-
I'm super excited to share with you my first ever Medium article on application logging for .NET Core! 🎉 In this article, I explain how to use design patterns to create well structured, reusable logging in your .NET Core applications, using .NET Core Ilogger. If you are interested in learning more about application logging for .NET Core, please check out my article and let me know what you think. I would love to hear your feedback and suggestions. 😊 Here is the link to my article: https://lnkd.in/dGsEf52C
Essential Logging in .NET Core for Production-Ready Applications
medium.com
To view or add a comment, sign in
-
Fluent Validation is a handy .NET tool that makes it easy to check if things are correct. It's great for making sure that Library and Book objects have all the right details, like required fields, the right length for text, and any special rules we need. It can do all this in a clear and simple way, making our code better and easier to understand. With Fluent Validation, we can also handle different situations, like when we only want to check something if a certain condition is true. It's a helpful tool for keeping our .NET Core projects tidy and error-free. #dotnet #fluentvalidation
Code with Fluent Validations in .NET (C#)
medium.com
To view or add a comment, sign in
-
🚀 New Article Alert! 🚀 I just published a new article on [Medium](https://medium.com/) where I explore the integration of FastEndpoints with Entity Framework in .NET to build scalable and efficient APIs. 🔑 Key Points Covered: Project Setup: Step-by-step guide to setting up FastEndpoints and Entity Framework in a .NET project. Data Mapping: How to efficiently map between entities and DTOs using custom mappers. Adding Migrations: A walkthrough on managing database schema changes with Entity Framework migrations. Testing with Swagger: How to leverage Swagger UI to test and visualize your API endpoints. Whether you're looking to optimize your current API development workflow or just curious about FastEndpoints, this article is packed with insights to help you get started. 👉 Check out the full article here: https://lnkd.in/eHqawRxR If you find it helpful, please like, comment, and share! Let's connect and discuss how we can improve our software engineering practices together. 💡 #SoftwareEngineering #APIDevelopment #FastEndpoints #EntityFramework #DotNet #WebDevelopment #CleanCode #TechInnovation
FastEndpoints and Entity Framework with .NET
link.medium.com
To view or add a comment, sign in
-
🚀 𝗦𝘁𝗿𝘂𝗴𝗴𝗹𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗗𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝗰𝘆 𝗜𝗻𝗷𝗲𝗰𝘁𝗶𝗼𝗻 𝗶𝗻 .𝗡𝗘𝗧 𝟴? 𝗛𝗲𝗿𝗲'𝘀 𝗬𝗼𝘂𝗿 𝗨𝗹𝘁𝗶𝗺𝗮𝘁𝗲 𝗚𝘂𝗶𝗱𝗲! In my latest post, I explore 𝗯𝗲𝘀𝘁 𝗽𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝘀 𝗮𝗻𝗱 𝗮𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝗽𝗮𝘁𝘁𝗲𝗿𝗻𝘀 for mastering Dependency Injection in .NET 8. Whether you're building a Minimal API or a complex enterprise application, these tips will help you write cleaner, more maintainable, and scalable code. 💡 𝗞𝗲𝘆 𝗛𝗶𝗴𝗵𝗹𝗶𝗴𝗵𝘁𝘀: - Choosing the right service lifetimes (Singleton, Scoped, Transient) - Avoiding common pitfalls like the Service Locator Anti-Pattern - Leveraging advanced patterns like the Decorator and Pipeline - Using the Options Pattern for cleaner configuration - Simplifying DI for generics with open generic registration 👉 Want to unlock the full potential of DI in .NET 8? Click below to learn how to elevate your development game! #dotnet #DependencyInjection #CSharp #CleanCode #BackendDevelopment https://lnkd.in/de53JEey
Mastering Dependency Injection in .NET 8: Best Practices and Proven Patterns for Cleaner Code
dev.to
To view or add a comment, sign in
-
.NET Garbage Collection The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you use the new operator to create an object, the runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.
To view or add a comment, sign in
-
Dependency Injection and Lifecycle in .NET 8 https://lnkd.in/dnPR6Nz9
Dependency Injection and Lifecycle in .NET 8
muratsuzen.github.io
To view or add a comment, sign in
-
I "love" how every developer roadmap includes 23325345 topics you need to master to be successful. Like, when are you going to learn all this? Out of the 24 hours you have: + 8h is work + 8h is sleep + 8h is free time (food, fitness, family, friends...) I get it. You have a little time to learn because you have other stuff in life. That's why, I've put a .NET developer roadmap on a diet. I present to you ".NET Developer Roadmap for 2025 [Minimalist Edition]": 1. Basic development skills - C# 12 - Using AI assistants - Version control 2. Engineering practices and principles - SOLID - YAGNI - KISS - DRY 3. Web API - ASP .NET Core (Controllers, Minimal API, Auth, Routing...) - GraphQL - gRPC 4. Relational databases - Database engines (MS SQL, PostgreSQL...) - SQL syntax - ORM 5. NoSQL databases - Redis - Azure Cosmos DB - ElasticSearch 6. Automated testing - Unit testing - Integration testing - Approval testing 7. Background tasks - Hangfire - Quartz .NET 8. Message queues - Azure Service Bus - RabbitMQ - Apache Kafka 9. Azure cloud services - Azure Functions - Virtual Machines - Storage Account - App Service - Azure SQL Database 10. Observability - Logging - Monitoring - Telemetry 11. Containerization - Docker - Kubernetes 12. Continuous Integration and Deployment (CI/CD) tools - Infrastucture as code - Azure DevOps - GitHub Actions - Team City Yes, this roadmap assumes you have at least 2-3 years of experience. In the comment you can find the link to the full roadmap. *** P.S. Lack of simplicity, not lack of time, is a true enemy in every C# project. ❌ Big classes. ❌ Poorly written business logic. ❌ Over-engineered software architecture. Inside my newsletter, you get tools, strategies, and systems to eliminate code complexity. (based on my 12 years of experience) Come join 3,057 developers here: https://lnkd.in/djSGihGa
To view or add a comment, sign in