public void Add(string value, string hash) { PalinItem item = new PalinItem(); item.Text = value; item.Hash = hash; _context.Add(item); _context.SaveChanges(); }
public void AddToDb(string str) { string hash = calulateHash(str); PalinItem item = _repo.Get(hash); if (item == null) { _repo.Add(str, hash); } }