I design simple DAL using Generic, i have 2 business objects matched to each other, one in BusLayer and the other in DAL.DAL just deal with DAL.Domain.CategoriesBusLayer see Business.BusinessObject.Categorie and DAL.Domain.CategoriesDALProxy is a class in business layer and it the only class talk with DALin Business Layer when developer need to get a recored from DB , he will write the following:
public
{
Business.BusinessObject.Categorie cat = proxy.GetRecord<Business.BusinessObject.Categorie, DAL.Domain.
Return cat;
}Then GetRecord Method in DALProxy call DAL DAO
}My Question is how to make Proxy.get Record take just T, not T and U.i mean developer not need to know the matching Domain object and type it.i need it to be implicit, and to be my problem is explained well i have a stupid solution:in proxy getrecord i will check type of T, if it a type of Categories then Call DAO.getRecord<DAL.Domain.Categories>, so i will have 150 if statments for each busobjectany smart solution