aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs')
-rw-r--r--Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs b/Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs
index d4d65c16d..a0cd24511 100644
--- a/Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs
+++ b/Software/Visual_Studio/Tango.BL/Builders/EntityCollectionBuilderBase.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
@@ -14,7 +13,6 @@ namespace Tango.BL.Builders
private List<KeyValuePair<int, Action>> _steps;
private List<KeyValuePair<int, Func<IQueryable<T>, IQueryable<T>>>> _querySteps;
private bool _entity_set;
- private Func<IQueryable<T>, IQueryable<T>> _appendQuery;
protected IEnumerable<T> Entities { get; set; }
@@ -40,11 +38,6 @@ namespace Tango.BL.Builders
query = queryStep.Value(query);
}
- if (_appendQuery != null)
- {
- query = _appendQuery(query);
- }
-
Entities = query.ToList();
});
@@ -65,11 +58,6 @@ namespace Tango.BL.Builders
query = queryStep.Value(query);
}
- if (_appendQuery != null)
- {
- query = _appendQuery(query);
- }
-
Entities = query.ToList();
});
@@ -83,12 +71,6 @@ namespace Tango.BL.Builders
return query;
}
- public TBuilder Query(Func<IQueryable<T>, IQueryable<T>> query)
- {
- _appendQuery = query;
- return this as TBuilder;
- }
-
protected void CommitSteps()
{
foreach (var step in _steps.ToList().DistinctBy(x => x.Key).OrderBy(x => x.Key))
@@ -122,18 +104,6 @@ namespace Tango.BL.Builders
return Entities.ToSynchronizedObservableCollection();
}
- public List<T> BuildList()
- {
- if (!_entity_set)
- {
- throw new InvalidOperationException("Could not build entity. Entity was not set.");
- }
-
- CommitSteps();
-
- return Entities.ToList();
- }
-
public Task<SynchronizedObservableCollection<T>> BuildAsync()
{
return Task.Factory.StartNew<SynchronizedObservableCollection<T>>(() =>
@@ -141,13 +111,5 @@ namespace Tango.BL.Builders
return Build();
});
}
-
- public Task<List<T>> BuildListAsync()
- {
- return Task.Factory.StartNew<List<T>>(() =>
- {
- return BuildList();
- });
- }
}
}