public ActionResult AddColors(List <Color> colors) { colors.RemoveAll(c => c.Id == 0 || c.Name == null); var repo = new ItemRepository(Properties.Settings.Default.ManufacturingConStr); repo.AddColors(colors); return(RedirectToAction("Colors")); }