Skip to content

Commit 11b4757

Browse files
committed
fix compound key T aspets
1 parent de41447 commit 11b4757

3 files changed

Lines changed: 282 additions & 79 deletions

File tree

SharpRepository.Repository/Aspects/CompoundKeyRepositoryGetContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ public bool HasResult
4242

4343
public class CompoundKeyRepositoryGetContext<T, TResult> : RepositoryActionContext<T> where T : class
4444
{
45-
public CompoundKeyRepositoryGetContext(ICompoundKeyRepository<T> repository, IEnumerable<object> ids, Expression<Func<T, TResult>> selector = null)
45+
public CompoundKeyRepositoryGetContext(ICompoundKeyRepository<T> repository, object[] ids, Expression<Func<T, TResult>> selector = null)
4646
: base(repository)
4747
{
4848
Ids = ids;
4949
Selector = selector;
5050
}
5151

52-
public IEnumerable<object> Ids { get; set; }
52+
public object[] Ids { get; set; }
5353
public TResult Result { get; set; }
5454

5555
public bool HasResult

SharpRepository.Repository/Aspects/RepositoryActionBaseAttribute.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public virtual void OnGetExecuted<T, TKey, TKey2, TResult>(CompoundKeyRepository
216216
public virtual void OnGetExecuted<T, TKey, TKey2, TKey3, TResult>(CompoundTripleKeyRepositoryGetContext<T, TKey, TKey2, TKey3, TResult> context) where T : class
217217
{
218218
}
219-
public virtual void OnGetExecuted<T, TResult>(RepositoryGetContext<T, TResult> context) where T : class
219+
public virtual void OnGetExecuted<T, TResult>(CompoundKeyRepositoryGetContext<T, TResult> context) where T : class
220220
{
221221
}
222222

@@ -317,12 +317,15 @@ public virtual bool OnFindAllExecuting<T, TResult>(CompoundKeyRepositoryQueryMul
317317
public virtual void OnFindAllExecuted<T, TKey, TResult>(RepositoryQueryMultipleContext<T, TKey, TResult> context) where T : class
318318
{
319319
}
320+
320321
public virtual void OnFindAllExecuted<T, TKey, TKey2, TResult>(CompoundKeyRepositoryQueryMultipleContext<T, TKey, TKey2, TResult> context) where T : class
321322
{
322323
}
324+
323325
public virtual void OnFindAllExecuted<T, TKey, TKey2, TKey3, TResult>(CompoundTripleKeyRepositoryQueryMultipleContext<T, TKey, TKey2, TKey3, TResult> context) where T : class
324326
{
325327
}
328+
326329
public virtual void OnFindAllExecuted<T, TResult>(CompoundKeyRepositoryQueryMultipleContext<T, TResult> context) where T : class
327330
{
328331
}

0 commit comments

Comments
 (0)