public void SaveLotteryNumbers(LotteryNumber lotteryNumber)
        {
            if (lotteryNumber.LotteryNumberId == 0)
            {
                context.LotteryNumbers.Add(lotteryNumber);
            }
            else
            {
                var dbEntry = context.LotteryNumbers.Find(lotteryNumber.LotteryNumberId);
                if (dbEntry != null)
                {
                    dbEntry.MatchNumbers = lotteryNumber.MatchNumbers;
                    dbEntry.FinalNumbers = lotteryNumber.FinalNumbers;
                }
            }

            context.SaveChanges();
        }
 public bool CheckDuplicateTicket(long ticketId,
                                  bool isForApproval, LotteryNumber lotteryNumber = null) =>
 DataAccess.CheckDuplicateTicket(ticketId, isForApproval, lotteryNumber);