public ActionResult NewCode(IRSample sample)
        {
            if (sample.Description == null)
                sample.Description = sample.Value.ToString();
            if (ModelState.IsValid)
            {
                repository.AddSample(sample);
            }

            return RedirectToAction("NewCode");
        }
 public void AddSample(IRSample sample)
 {
     db.IRSamples.Add(sample);
     db.SaveChanges();
 }