//通过主表的id查询子表的id
public List<obj> FetchByID(Guid ID)
{
//查询条件
Expression<Func<obj, bool>> predicate = x => !x.Deleted && x.HiddenTroubleInfo_ID == ID;
//排序
Expression<Func<obj, dynamic>> sortPredicate = x => x.条件;(排序的条件)
RepositoryExtend.DisableFilter(_repository);
var list = _repository.GetBy(predicate, sortPredicate, SortOrder.Descending, false).ToList();
return list;
}
//取remark的最新的一条记录
值=obj.FetchByID(dto.ID).FirstOrDefault().Remark;