public void Insert_ValidData_NoEx() { using (var trans = TransHelper.NewScope()) { // arrange var expected = SubJenisBrgDataFactory(); // act _subJenisBrgDal.Insert(expected); // assert } }
public SubJenisBrgModel Save(SubJenisBrgModel subJenisBrg) { // validasi var result = subJenisBrg; result = TryValidate(subJenisBrg); // save var dummySubJenisBrg = _subJenisBrgDal.GetData(subJenisBrg.SubJenisBrgID); if (dummySubJenisBrg == null) { _subJenisBrgDal.Insert(result); } else { _subJenisBrgDal.Update(result); } return(result); }