Skip to content

Commit 7bb5d1f

Browse files
committed
save intermediate refactoring
1 parent 71d7bf5 commit 7bb5d1f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Components/DLM/BExIS.Dlm.Services/DataStructure/UnitManager.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using BExIS.Dlm.Entities.DataStructure;
2+
using BExIS.Security.Entities.Requests;
23
using System;
34
using System.Collections.Generic;
45
using System.Diagnostics.Contracts;
@@ -9,19 +10,19 @@ namespace BExIS.Dlm.Services.DataStructure
910
{
1011
public class UnitManager : IDisposable
1112
{
12-
private IUnitOfWork guow = null;
13+
private readonly IUnitOfWork _guow;
14+
private bool _isDisposed;
1315

14-
public UnitManager() //: base(false, true, true)
16+
public UnitManager()
1517
{
16-
//// define aggregate paths
17-
////AggregatePaths.Add((Unit u) => u.ConversionsIamTheSource);
18-
guow = this.GetIsolatedUnitOfWork();
19-
this.Repo = guow.GetReadOnlyRepository<Unit>();
20-
//this.ConversionMethodRepo = uow.GetReadOnlyRepository<ConversionMethod>();
21-
this.DimensionRepo = guow.GetReadOnlyRepository<Dimension>();
18+
_guow = this.GetIsolatedUnitOfWork();
19+
UnitRepository = _guow.GetReadOnlyRepository<Unit>();
20+
DimensionRepository = _guow.GetReadOnlyRepository<Dimension>();
2221
}
2322

24-
private bool isDisposed = false;
23+
public IReadOnlyRepository<Party> PartyRepository { get; }
24+
public IReadOnlyRepository<Request> RequestRepository { get; }
25+
public IQueryable<Request> Requests => RequestRepository.Query();
2526

2627
~UnitManager()
2728
{

0 commit comments

Comments
 (0)