```
public SelectExpandClause SelectExpandClause
{
get
{
if (_selectExpandClause == null)
{
ODataUriParser uriParser = new ODataUriParser(Context.Model, serviceRoot: null);
_selectExpandClause = uriParser.ParseSelectAndExpand(RawSelect, RawExpand, _entityType, entitySetBase: null);
}
return _selectExpandClause;
}
}
```
In the above code where we create the SelectSexpandClause, we pass null to the entitySetBase. This results in a SelectExpandClause whose EntitySet properties are null, which makes very hard to do any kind of validation.
We should pass in the right EntitySet to the clause.
public SelectExpandClause SelectExpandClause
{
get
{
if (_selectExpandClause == null)
{
ODataUriParser uriParser = new ODataUriParser(Context.Model, serviceRoot: null);
_selectExpandClause = uriParser.ParseSelectAndExpand(RawSelect, RawExpand, _entityType, entitySetBase: null);
}
return _selectExpandClause;
}
}
```
In the above code where we create the SelectSexpandClause, we pass null to the entitySetBase. This results in a SelectExpandClause whose EntitySet properties are null, which makes very hard to do any kind of validation.
We should pass in the right EntitySet to the clause.