public bool Updateverification(EnrolleeVerificationCode verificationcode) { if (verificationcode != null) { _session.Transact(session => session.Update(verificationcode)); //Notify the theres a new verificationCode VerificationCodeChangeArgs args = new VerificationCodeChangeArgs { VerificationCode = verificationcode }; //Notify the Hub of the new Input EventContext.Instance.Publish(typeof(INewNotificationEvent), args); return(true); } return(false); }
public bool Addverification(EnrolleeVerificationCode verificationcode) { bool exist = _session.QueryOver <EnrolleeVerificationCode>().Where(x => x.VerificationCode == verificationcode.VerificationCode).Any(); if (verificationcode != null && exist == false) { _session.Transact(session => session.Save(verificationcode)); //Notify the theres a new verificationCode VerificationCodeChangeArgs args = new VerificationCodeChangeArgs { VerificationCode = verificationcode }; //Notify the Hub of the new Input EventContext.Instance.Publish(typeof(INewNotificationEvent), args); return(true); } return(false); }