c# - create an instance of a manager class -
let's have class customermanager lot of methods interact dal.customermanager. there lot's of mehods not interact dal.customermanager class. should instantiate _dalcustomermanager class code below? public class customermanager { private dal.customermanager _dalcustomermanager = new dal.customermanager(); public void deletecustomer(int customerid) { // .. logic here ... _dalcustomermanager.deletecustomer(customerid); } } or better solution because don't instance of _dalcustomermanger , when access dalcustomermanager property creates new instance of when it's null ? public class customermanager { private dal.customermanager _dalcustomermanager; private dal.customermanager dalcustomermanager { { return _dalcustomermanager ?? (_dalcustomermanager = new dal.customermanager()); } } public void deletecustomer(int customerid) { // .. logic here ... dalcus...