public string getRefNo() { string refNo = ""; bool numberExist = false; do { refNo = _logicService.getRandomNo(); numberExist = _db.Deposits.ToList().Any(d => d.RefNo == refNo); } while (numberExist); return(refNo); }
public string getRefNo() { string refNo = ""; bool numberExist = false; do { refNo = _logicService.getRandomNo(); numberExist = _db.Transactions.ToList().Any(i => i.RefNo == refNo); } while (numberExist); return(refNo); }