コード例 #1
0
        /// <summary>
        /// 账号注册
        /// </summary>
        /// <param name="loginQuery"></param>
        /// <returns></returns>
        public async Task <bool> Register(LoginQuery loginQuery)
        {
            var id   = Guid.NewGuid();
            var time = DateTime.Now;
            var sql  = "INSERT INTO Users (Id,LoginCode,PassWord,Phone,DateTime) VALUES (@Id,@LoginCode,@PassWord,@Phone,@DateTime)";
            await _sqlQuery.ExecuteAsync(sql,
                                         new
            {
                Id        = id,
                LoginCode = loginQuery.LoginCode,
                PassWord  = loginQuery.PassWord,
                Phone     = loginQuery.Phone,
                DateTime  = time
            });

            return(true);
        }
コード例 #2
0
ファイル: SingleSql.cs プロジェクト: ulswww/DirectDapper
 public async Task ExecuteAsync(ISqlQuery query)
 {
     var sql = ReplaceSql(_sql);
     await query.ExecuteAsync(sql, _searcheObj);
 }