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

namespace PushInfo.Core.DAL.MySql
{
    public class SysSendCfgDAL : DapperORM.BaseRepository<Sys_Send_Cfg>
    {
        /// <summary>
        /// 查询单条记录
        /// </summary>
        /// <param name="where"></param>
        /// <param name="select"></param>
        /// <param name="sort"></param>
        /// <returns></returns>
        public ResultModel<Sys_Send_Cfg> GetModel(Expression<Func<Sys_Send_Cfg, bool>> where = null, Expression<Func<Sys_Send_Cfg, object>> select = null, IDictionary<string, bool> sort = null)
        {
            return GetAsync(where, select, sort).Result;
        }

        public ResultModel<IEnumerable<Sys_Send_Cfg>> GetList(Expression<Func<Sys_Send_Cfg, bool>> where = null, Expression<Func<Sys_Send_Cfg, object>> select = null, IDictionary<string, bool> sort = null)
        {
            return FetchAsync(where, select, sort).Result;
        }
    }
}
