📜  参数表达式<Func<T, object> &gt;[] includeProperties - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:31.547000             🧑  作者: Mango

代码示例1
public TEntity GetById(Guid id, params Expression>[] includeProperties)
    {
        if (id == Guid.Empty) return null;

        var set = _unitOfWork.CreateSet();
        foreach(var includeProperty in includeProperties)
        {
             set.Include(includeProperty);
        }
        return set.First(i => i.Id == id);
    }