예제 #1
0
        public void GetDataBukuTanahByIdTest()
        {
            GetDataBukuTanahByIdRequest request = new GetDataBukuTanahByIdRequest();

            request.NB_Barcode = _bukuTanahGetDataById.NB_Barcode;
            GetDataBukuTanahByIdResponse response = _bukuTanahService.GetDataBukuTanahById(request);

            Assert.IsTrue(response.Messages.Count == 0, "Failed get data by Id");
        }
예제 #2
0
        public GetDataBukuTanahByIdResponse GetDataBukuTanahById(GetDataBukuTanahByIdRequest request)
        {
            GetDataBukuTanahByIdResponse response = new GetDataBukuTanahByIdResponse();

            try
            {
                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions {
                    IsolationLevel = IsolationLevel.ReadCommitted
                }))
                {
                    response.BukuTanah = _bukuTanahRepo.GetDataById(request.NB_Barcode);
                    transScope.Complete();
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }

            return(response);
        }