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
{
    public class ProjectInfoDAL : BaseRepository<Project_Info>, IProjectInfo
    {
        public ResultModel<Project_Info> GetModel(Expression<Func<Project_Info, bool>> where = null, Expression<Func<Project_Info, object>> select = null, IDictionary<string, bool> sort = null)
        {
            return GetAsync(where, select, sort).Result;
        }

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