For instance I have IRepository, Implemented by Repository with some Interceptors.
Inside the Interceptor I see that IRepositoryProxy basetype is Object and Not the Repository.
For example: I resolve IRepository and call GetFunctionalityPurposes,
what I want is the call to GetAllFunctionalityPurposes to be also cached/proxied.
This does not work since the methods are invoked in Repository but not IRepositoryProxy.
IRepository
FunctionalityPurpose[] GetFunctionalityPurposes();
FunctionalityPurpose[] GetAllFunctionalityPurposes()
Repository
[Cached("Tender")]
public virtual FunctionalityPurpose[] GetFunctionalityPurposes()
{
var model = GetAllFunctionalityPurposes()
.Where(r => !r.IsHidden && !r.GroupId.HasValue);
return model;
}
[Cached("Tender", "FunctionalityPurpose")]
public virtual FunctionalityPurpose[] GetAllFunctionalityPurposes()
{
var model = UnitOfWork.GetSet<Model>().Select(f => f.FunctionalityPurpose)
.Distinct().OrderBy(r => r.Id).ToArray();
return model;
}