public void InsertDataBukuTanahTest() { InsertDataBukuTanahRequest request = new InsertDataBukuTanahRequest(); request.BukuTanah = _bukuTanahValidData; InsertDataBukuTanahResponse response = _bukuTanahService.InsertDataBukuTanah(request); Assert.IsTrue(response.Messages.Count == 0, "Failed insert data"); }
public InsertDataBukuTanahResponse InsertDataBukuTanah(InsertDataBukuTanahRequest request) { InsertDataBukuTanahResponse response = new InsertDataBukuTanahResponse(); try { using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted })) { _bukuTanahRepo.Add(request.BukuTanah); transScope.Complete(); } } catch (Exception ex) { throw new Exception(ex.ToString()); } return(response); }