private void InserPrams(int formulaId, List <string> pramList) { foreach (var item in pramList) { AssayFormulaPram tmpPram = new AssayFormulaPram(); tmpPram.formulaId = formulaId; tmpPram.pramName = item; _formulaPramRep.Insert(tmpPram); } }
private void UpdatePrams(int formulaId, List <string> pramList) { var items = _formulaPramRep.GetAll().Where(x => x.formulaId == formulaId); foreach (var item in items) { _formulaPramRep.Delete(item); } foreach (var item in pramList) { AssayFormulaPram tmpPram = new AssayFormulaPram(); tmpPram.formulaId = formulaId; tmpPram.pramName = item; _formulaPramRep.Insert(tmpPram); } }