示例#1
0
        public IHttpActionResult CheckUserLogin(string usercode, string password)
        //public string CheckUserLogin(string usercode, string password)
        {
            //TBLUSER user = DbContext.User.Where(x => x.USERCODE == usercode).FirstOrDefault();
            DapperFactory dapper = new DapperFactory();
            var           result = dapper.CheckLogin(usercode);

            if (result <= 0)
            {
                //return BadRequest("用户名不存在!");
                return(BadRequest("用户名不存在!"));
            }
            //return "登录成功!";
            return(Ok("登录成功!"));
            //return Ok(new { message = "登录成功!" });
        }