© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Davide Bellone
Principal backend developer | Content Creator | Microsoft MVP
What do you think of interfaces implemented by only one class, when that class represents a Service and not a DTO?
Something like
public interface IDoSomething{ void Do(); } public class DoSomething : IDoSomething{ void Do(); }
Maxi Contieri
Software Engineer
IDoSomething is a name problem. I've never seen an IDoSomething in real world. I assume it is a bad convention.
If this a service provided as an API interface for other systems it might suit the Exceptions scenario.
If it is for internal use is a code smell on premature generalization