public void Update_ValidDat_NoEx() { using (var trans = TransHelper.NewScope()) { // arrang var expected = JenisBrgDataFactory(); // act _jenisBrgDal.Update(expected); // assert } }
public JenisBrgModel Save(JenisBrgModel jenisBrg) { // validasi var result = jenisBrg; result = TryValidate(jenisBrg); // save var dummyJenisBrg = _jenisBrgDal.GetData(jenisBrg.JenisBrgID); if (dummyJenisBrg == null) { _jenisBrgDal.Insert(result); } else { _jenisBrgDal.Update(result); } return(result); }