コード例 #1
0
        public JesusPlayground()
        {
            var audibleRepo = new AudibleRepo();

            audibleRepo.GetUsuarioById(1);

            var otherRepo = new OtherRepo();
            //otherRepo. (does not have GetUsuarioById)
        }
コード例 #2
0
        public JesusPlayground()
        {
            var auditableRepo = new AuditableRepo();

            auditableRepo.GetUsuarioById(1);
            var otherRepo = new OtherRepo();
            //otherRepo. (does not have GetUsuarioById
            var auditableRepoNotUsingTheActualClass = new GenericRepository <IAuditable>();

            auditableRepoNotUsingTheActualClass.GetUsuarioById(1);     //still works!
        }