public void Bad() { var sampleData = LookupA.LoadSome(); if (sampleData != null) { RepositoryA.Persist(sampleData); } else { Logger.Log("No data"); } }
public void Worst() { var sampleData = LookupA.LoadSome(); RepositoryA.Persist(sampleData); }
// Pass Mock Repositories in unit tests -> PS: You can't have 2 constructors if you're using dependency injection. public Service(RepositoryA a, RepositoryB b) { _a = a; _b = b; }
public PersonWorkerDTO GetPersonWorker() { RepositoryA.GetSomething(); RepositoryB.GetSomething(); RepositoryC.GetSomething(); }