i try to write manager class. But i can not use that :
return erpObj.Get(predicate);
How can i do that?
namespace Erp.BLL.Manager
{
public interface ILoad
{
List<TResult> Load<TKey,TResult>(List<TKey> list, Func<TKey, TResult> select);
}
public interface IRepository<TModel>
{
List<TModel> Get(Func<TModel, bool> predicate);
}
public interface IErpManager
{
List<TResult> Load<TKey,TResult>(ILoad erpObj, List<TKey> list, Func<TKey, TResult> select);
List<TModel> Get(IRepository<TModel> erpObj, Func<TModel, bool> predicate);
}
public class ErpManager : IErpManager
{
#region IErpManager Members
public List<TResult> Load<TKey, TResult>(ILoad erpObj, List<TKey> list, Func<TKey, TResult> select)
{
return erpObj.Load(list, select);
}
public List<TModel> Get(IRepository<TModel> erpObj, Func<TModel, bool> predicate)
{
return erpObj.Get(predicate);
}
#endregion
}
}