实例通用存储库:是否objective-c具有类似于c#的泛型类型(和约束)?
public interface IGenericRepository<T> where T : class
{
IQueryable<T> GetAll();
IQueryable<T> FindBy(Expression<Func<T, bool>> predicate);
void Add(T entity);
void Delete(T entity);
void Update(T entity);
void Save();
}
我期待用在我的应用程序的模型层的存储库模式,似乎无法比较C#泛型类型的Objective-C时,发现很多关于这个问题的。