public async Task <OTPResponse> ValidateOTP(OTPRequest oData) { OTPResponse sResponse = new OTPResponse(); try { var users = await _usersData.FindByUsernameAsync(oData.userName); if (users.Count > 0) { var otpvalidate = _usersData.ValidateOTP(oData); if (otpvalidate.msgRespone == true) { sResponse.status = "true"; sResponse.message = otpvalidate.msg; } else { sResponse.status = "false"; sResponse.message = otpvalidate.msg; } } else { sResponse.status = "false"; sResponse.message = "Username does not exist"; } return(sResponse); } catch (Exception e) { sResponse.status = "false"; sResponse.message = e.Message; } return(sResponse); }