public interface IEntity
{
void doSomething();
}
public class Service
private readonly IEntity _entity;
public Service(IEntity _entity)
// why this declaration???
public IEntity Entity { get { return _entity; } }
public void doWork()
// why not calling _entity directly
Entity.doSomething();
public class Program { public static void Main(){} }