Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 internal IDbQuery SelectEmployeeWithCode5(string code)
 {
     return(this.UseQuery("SelectEmployeeWithCode5", p =>
                          p.SelectQuery <DbEmployee>()
                          .WithFields(Tuple("Fields_SelectEmployee"))
                          .Where(q => DbFluent.Exists(
                                     q.UseSubQuery(
                                         DbFluent.SelectQuery(DbFluent.Table("Employee", "Mdm"))
                                         .AddIdField(q => DbFluent.FieldAsParameter(nameof(DbEmployee.Code), q.UseParameter("code", DataValueTypes.Text))))))
                          )
            .WithParameters(
                ElementFactory.CreateScalar("code", code)));
 }