using System;
using System.Linq.Expressions;
using System.Collections.Generic;
using DapperORM;
using DapperORM.Common.Models;
using PushInfo.Core.Models.Tables;
using PushInfo.Core.IDAL;

namespace PushInfo.Core.DAL.MySql
{
    internal class TableInfoDAL : BaseRepository<Table_Info>, ITableInfoDAL
    {
        public ResultModel<Table_Info> GetModel(Expression<Func<Table_Info, bool>> where = null, Expression<Func<Table_Info, object>> select = null, IDictionary<string, bool> sort = null)
        {
            return GetAsync(where, select, sort).Result;
        }

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