Am working on LLbgen migration from 1.x to 5.7 version.. Am getting issues while building the newly migrated code.
Below is my existing code which using the LLBLGen version 1.x
public ISortExpression CreateSortExpression()
{
ISortExpression sorter = null; //add to switch new tables.
switch (_sortTable) {
case "UserEntity":
sorter = new SortExpression(SortClauseFactory.Create((UserFieldIndex)_sortField, _sortDirection));
break; }
UserFieldIndex is a enum
After migration to 5.7 version , am getting The name 'SortClauseFactory' does not exist in the current context
sorter = new SortExpression(SortClauseFactory.Create((UserFieldIndex)_sortField, _sortDirection));
Could you please help me on this. Alternative way to rewrite based on 5.7 version.
My dal :
namespace DALGeneric
{
public enum UserFieldIndex
{
///<summary>EmailAddress. </summary>
EmailAddress,
///<summary>Extension. </summary>
Extension,
}
}
and in my BL private SortOperator _sortDirection;
private int _sortField;
public SortOperator SortDirection
{
get { return _sortDirection; }
set { _sortDirection = value; }
}
public int SortField
{
get { return _sortField; }
set { _sortField = value; }
}
sort field is column and sort direction is asc/desc
As you've noticed,
SortClauseFactory
is no longer required. You can use (_sortField
is anEntityField
/EntityField2
,_sortDirection
is aSortOperator
):