using PoJun.Dapper;
using ASHermed.SinoInterface.Api.IRepository.Test;
using ASHermed.SinoInterface.Entity.Test;
using ASHermed.SinoInterface.Repository.MySql;
using ASHermed.SinoInterface.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ASHermed.SinoInterface.Api.ContractModel.App;
using ASHermed.SinoInterface.Api.IRepository;

namespace ASHermed.SinoInterface.Api.MySqlRepository
{
   
	public class DicNationalityRepository : BaseRepositoryToASHermed_SinoInterface<Dic_Nationality>, IDicNationalityRepository
    {

        public Dic_Nationality SelectByPrimaryKey(int nationId)
        {
            var selectSql = new StringBuilder();

            selectSql.Append(@"select ID, CN_NAME, EN_NAME, IMAGE, VALUE, STATUS, CREATE_USER, CREATE_TIME, UPDATE_USER,UPDATE_TIME
                            from dic_nationality
                            where ID = @ID");

            var parms = new Dictionary<string, object>();
            parms.Add("@ID", nationId);
            var result = Query<Dic_Nationality>(selectSql.ToString(), parms);
            return result?.FirstOrDefault();
        }

    }


}
