Example #1
0
        public void Add(string value, string hash)
        {
            PalinItem item = new PalinItem();

            item.Text = value;
            item.Hash = hash;
            _context.Add(item);
            _context.SaveChanges();
        }
Example #2
0
        public void AddToDb(string str)
        {
            string    hash = calulateHash(str);
            PalinItem item = _repo.Get(hash);

            if (item == null)
            {
                _repo.Add(str, hash);
            }
        }