Last active
March 25, 2020 07:26
-
-
Save handeebrar/e4048d7340bee53073307b49a203f826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomerBusinessLogic | |
{ | |
ICustomerDataAccess _dataAccess; | |
public CustomerBusinessLogic(ICustomerDataAccess custDataAccess) | |
{ | |
_dataAccess = custDataAccess; | |
} | |
public CustomerBusinessLogic() | |
{ | |
_dataAccess = new CustomerDataAccess(); | |
} | |
public string ProcessCustomerData(int id) | |
{ | |
return _dataAccess.GetCustomerName(id); | |
} | |
} | |
public interface ICustomerDataAccess | |
{ | |
string GetCustomerData(int id); | |
} | |
public class CustomerDataAccess: ICustomerDataAccess | |
{ | |
public CustomerDataAccess() | |
{ | |
} | |
public string GetCustomerName(int id) | |
{ | |
return "CustomerName"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment