public TR FindSingleAs <TR>(object id) where TR : class { int intId = (int)id; Expression <Func <T, TR> > exp = QueryMapper.GetExpression <T, TR>(); return(Loader.Where(d => d.Id == intId).Select(exp).FirstOrDefault()); }
public TR FindSingleAs <TR>(Expression <Func <T, bool> > expression) where TR : class { Expression <Func <T, TR> > exp = QueryMapper.GetExpression <T, TR>(); return(Loader.Where(expression).Select(exp).FirstOrDefault()); }