public virtual TResult Single() { using (var translator = DMObjectContainer.GetTSQLTranslator()) { using (TranResult tr = translator.CreateSelectTSQL <T1>(where.LambdaExpression, select.LambdaExpression, join.LambdaExpression)) { using (ATSqlCommand cmd = new ATSqlCommand()) { cmd.SetCmdText(tr.CmdText); cmd.SetParameters(tr.Parameter.ToArray()); cmd.SetConnectionString(base.ConnectionString); return(cmd.ToEntity <TResult>()); } } } }