c# - Overuse of "service" classes when using DI containers? -


I'm beginning to learn about using di containers. I'm injected with some reliance "service" classes (Like ParsingService ), I'm looking for myself.

Is it possible that I am using service classes more if it is

thanks.

Often, you can use constructor injection instead of "services" to meet similar, or similar goals. There are often many advantages of this many times, and many IoCs are more in line with the container's goals.

I will suggest the article of Martin Fowler on this topic, especially in their section they discussed the benefits of both methods.

Comments