Is dependency injection is the only way to achieve loose coupling in c# ?? I have been going through injection (DI), to solve the tight coupling, I found DI as one solution for that ! Buy I'm looking for other solutions even
Loose coupling in c#
651 Views Asked by shashank s At
1
There are 1 best solutions below
Related Questions in DEPENDENCY-INJECTION
- How to add logging to an abstract class in php
- Nest.js can't resolve dependencies of the external library's Reflector dependency
- Do we need IoC containers in typescript if ts-mock-imports exists
- Blazor/Razor resolve components using dependency injection
- Access Registed Scoped Services and Transient Services using GetService()
- using state data class alongside ComposeDestinations
- Messing up with conflict between spring jcl and commons-logging.jar
- How to write pytest tests for a FastAPI route involving dependency injection with Pydantic models using Annotated and Depends?
- .NET Core Include Method in Dependency Injection
- Injecting IHubContext into my background service for SignalR in .NET 5
- Issue with service method call in .NET Background Service , Issue with Scope
- How can I inject the prisma io module using inversify in my node.js project?
- Angular service injection hierarchy
- Trouble with "dotnet run seeddata" when trying to seed a database with EntityFrameworkCore. Specifically with ASP.NET Core 6 Web API
- NX Angular unit tests fail because of NullInjectorError
Related Questions in LOOSE-COUPLING
- React/Typescript - Trying to create a container for loosely coupled services, but then the services are not being built/compiled
- As we know we cannot instantiate, but i have gone through a code and found that object is created and how?
- How to follow PoLP with a cloud run application and multiple services without tight coupling
- Using Akka.net with Asp.net on a Modular Monolith architecture
- Spring boot @Autowired vs Dynamic Polymorphism in case of loose coupling?
- Reduce coupling in a SOAP client
- Loose coupling in Dart
- tight coupling and loose coupling examples with Java code
- How does Spring Framework choose between two components?
- why is my PubSub pattern not working as intended
- How to load data from different property files based on query parameters from the rest API?
- How loose coupling is achieved in Annotation based approach
- Reducing coupling from switch statement
- Does passing an object as a parameter result in the same level of coupling as having it stored in a field?
- Loose coupling in c#
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
your question is a bit abstract. you first need to define your problem. But, in order to write a loosely coupled, you'll need to use abstractions and not implementations (so you can inherit and override whatever you want) and inject the abstractions with dependency injection to your class/methods.
that way you are not coupled to the specific implementation of the code and whoever wants can just implement the interface and pass it to the class/method.