public async Task <string> OTPVerificationDB(OTPVerificationRequest ObjOTPVerificationRequest)
        {
            string ResponseMessage = "";

            try
            {
                var param = new SqlParameter[] {
                    new SqlParameter()
                    {
                        ParameterName = "@userName",
                        SqlDbType     = System.Data.SqlDbType.VarChar,
                        Size          = 100,
                        Direction     = System.Data.ParameterDirection.Input,
                        Value         = string.IsNullOrEmpty(ObjOTPVerificationRequest.Username)?String.Empty:ObjOTPVerificationRequest.Username
                    },
                    new SqlParameter()
                    {
                        ParameterName = "@OTP",
                        SqlDbType     = System.Data.SqlDbType.VarChar,
                        Size          = 10,
                        Direction     = System.Data.ParameterDirection.Input,
                        Value         = string.IsNullOrEmpty(ObjOTPVerificationRequest.otp)?String.Empty:ObjOTPVerificationRequest.otp
                    },
                    new SqlParameter()
                    {
                        ParameterName = "@ResponseMessage",
                        SqlDbType     = System.Data.SqlDbType.VarChar,
                        Size          = -1,
                        Direction     = System.Data.ParameterDirection.Output
                    }
                };
                string queryString = "";
                queryString     = "Sp_OTPVerification @userName,@OTP,@ResponseMessage OUT";
                ResponseMessage = await _IDBLayercs.ExecuteAsyncSql(param, queryString, 2);

                //var _Context = new AuthenticationContext();

                //int affectedRows = await _Context.Database.ExecuteSqlRawAsync("sp_PartnershipApprovalupdate @UserID,@userName,@BookingID,@ResponseMessage OUT", param);
                //ResponseMessage = Convert.ToString(param[3].Value);
            }
            catch (Exception ex)
            {
                ResponseMessage = ex.Message.ToString();
            }
            return(ResponseMessage);
        }
예제 #2
0
        public async Task <string> OTPVerification(OTPVerificationRequest ObjOTPVerificationRequest)
        {
            string ResponseMessage = await _eventBookingRepository.OTPVerificationDB(ObjOTPVerificationRequest);

            return(ResponseMessage);
        }
예제 #3
0
 public async Task <IActionResult> VerifyOTP(int customerId, [FromBody] OTPVerificationRequest otpVerificationRequest)
 {
     Logger.LogInformation($"Received OTP {otpVerificationRequest.OTP} of customer {customerId} for verification");
     return(Ok());
 }
예제 #4
0
        public async Task <IActionResult> OTPVerification(OTPVerificationRequest ObjOTPVerificationRequest)
        {
            string ResponseMessage = await _eventBookingService.OTPVerification(ObjOTPVerificationRequest);

            return(Ok(ResponseMessage));
        }