public IQueryable<Group> GetByParentGroupIdAndName( int? parentGroupId, string name ) { return Queryable().Where( t => ( t.ParentGroupId == parentGroupId || ( parentGroupId == null && t.ParentGroupId == null ) ) && t.Name == name ); }