📅  最后修改于: 2022-03-11 15:03:31.547000             🧑  作者: Mango
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);
}