/// <summary> /// /// </summary> /// <param name="code"></param> /// <returns></returns> internal IDbQuery SelectEmployeeWithCode3(string code) { return(this.UseQuery("SelectEmployeeWithCode3", p => DbFluent.SelectQuery(null) .From( Table <DbEmployee>(), DbFluent.TableAsJoin( DbQueryJoinKind.Left, Table("RegionalDirectorate"), JoinCondition("Employee_RegionalDirectorate"))) .WithFields(Tuple("Fields_SelectEmployee")) .WithLimit(100) .OrderBy( DbFluent.OrderBy(Field <DbEmployee>(p => p.Code, "employee")), DbFluent.OrderBy(Field <DbEmployee>(p => p.DateTimeField, "regionalDirectorate"), DataSortingModes.Descending)) .AddIdField(q => DbFluent.FieldAsParameter(nameof(DbEmployee.Code), q.UseParameter("code", DataValueTypes.Text)))) .WithParameters( ElementFactory.CreateScalar("code", code))); }