public Claim AddClaim(PeriodId periodId, string employeeNo, string title, DateTime requestDate, ClaimTypeEnum claimTypeId, string request) { try { using (var tr = new TransactionScope()) { var id = claimRep.GetNextId(); var period = periodRep.GetById(periodId); var claim = new Claim(id, period, employeeNo, title, requestDate, claimTypeId, request); claimRep.Add(claim); tr.Complete(); return(claim); } } catch (Exception exp) { var res = claimRep.TryConvertException(exp); if (res == null) { throw; } throw res; } }