public void Insert_ValidData_NoEx() { using (var trans = TransHelper.NewScope()) { // arrange var expected = JenisBrgDataFactory(); // act _jenisBrgDal.Insert(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); }