/// <summary> /// An example of the evil that beseiges us... /// </summary> public void SomethingImportant() { // Can't be injected // Can't be easily mocked // Often leads to Cross-cutting concerns var prods = LogicLayer.GetProducts(); // can be easily tested by adding a setter var prods2 = LogicLayerSington.Instance.GetProducts(); }
public List <Product> GetProducts() { return(LogicLayer.GetProducts()); }