I am working on a asp.net project having a three-layered implementation. DataAccess Layer is there.DataAccessContract is a layer which contains all the interfaces which classes in dataaccess layer implement.Similarly we have a business layer and a businessLayer contract.
Now when we call Data Access from Business Layer, we call
IUserDAL userControllerDAL=new UserDAL();
UserDAL is inside DataAccess and IUserDAL is inside DataAccessContract.
I could have done it this way
UserDAL user=new UserDAL();
What is the difference between these two approaches and how first one is better than second. is it some pattern in the first case.Please explain with some examples.