Example #1
0
 public static int GetCount(string board_type)
 {
     return(MySqlDapperHelper.RunGetQueryFromXml <int>("Sql/Board.xml", "GetBoardCount", new
     {
         board_type = board_type,
     }).FirstOrDefault());
 }
Example #2
0
        /* 필요한가?
         * public string UPDATE_IP { get; set; }
         * public string UPDATE_USER { get; set; }
         * public string UPDATE_USERNAME { get; set; }
         * public DateTime? UPDATE_DATE { get; set; }
         */

        public static BoardModel Get(string board_type, int seq)
        {
            return(MySqlDapperHelper.RunGetQueryFromXml <BoardModel>("Sql/Board.xml", "GetBoard", new
            {
                board_type = board_type,
                seq = seq
            }).FirstOrDefault());
        }
Example #3
0
        public static UserinfoModel GetLogin(string user_id, string pw)
        {
            var model = MySqlDapperHelper.RunGetQueryFromXml <UserinfoModel>("Sql/User.xml", "GetUserInfoAll", new { user_id = user_id.ToLower() }).FirstOrDefault();

            if (model == null)
            {
                throw new Exception("id 없음");
            }
            else
            {
                var pwhash = CoreLib.Crypter.HMacSha256.GetHMac(pw.Trim(), model.UNIQUE_ID.ToString());

                if (model.PASSWORD != pwhash)
                {
                    throw new Exception("패스워드가 틀렸습니다");
                }

                return(model);
            }
        }
Example #4
0
 public static IEnumerable <TestModel> GetList(int col1)
 {
     return(MySqlDapperHelper.RunGetQueryFromXml <TestModel>("Sql/Home.xml", "GetTestData", new { COL1 = col1 }));
 }