/// <summary>

    /// 数据查询业务逻辑基础类

    /// </summary>

    /// <typeparam name="T">条件类型</typeparam>

    /// <typeparam name="E">实体对象类型</typeparam>

    public abstract class QueryLogicAdapter<T,E> : SingleLogicAdapter where T:IFilter,new()

    {

        #region IQueryLogic 成员

        private T mFilter = new T();

        public T Filter

        {

            get

            {

                return mFilter;

            }

            set

            {

                mFilter = value;

            }

        }

        private List<E> mItems;

        public List<E> Items

        {

            get

            {

                return mItems;

            }

      

        }

        protected override void OnExecute()

        {

            mItems = Filter.GetExpression().List<E>();

        }

 

        #endregion

    }

应用例程:

    public class UserQuery:HFSoft.BusinessLogic.QueryLogicAdapter<UserFilter,Entities.SysUser>

    {

    }

 

相关文章:

  • 2021-04-10
  • 2021-04-30
  • 2022-01-08
  • 2022-12-23
  • 2022-02-26
  • 2021-07-29
  • 2021-10-01
  • 2022-01-21
猜你喜欢
  • 2021-08-30
  • 2021-09-20
  • 2021-04-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-12-30
相关资源
相似解决方案