using DapperORM.Common.Models;
using PushInfo.Core.IDAL;
using PushInfo.Core.Models.Tables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PushInfo.Core.BLL
{
    public class SelectItemDetailBLL
    {
        /// <summary>
        /// 项目任务配置表数据访问接口
        /// </summary>
        private ISelectItemDetailDAL mapSelItemDetailDal;

        /// <summary>
        /// 构造函数
        /// </summary>
        public SelectItemDetailBLL()
        {
            this.mapSelItemDetailDal = DALFactory.CreateSelectItemDetailDAL();
        }

        #region 根据主键查询
        /// <summary>
        /// 根据主键查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Select_Item_Detail Query_By_Id(string id)
        {
            var result = mapSelItemDetailDal.GetModel(x => x.Id == id);
            if (result.IsSuccess())
                return result.Data;
            else
                return null;
        }
        #endregion
    }
}
