Shape is an Access database feature that returned hierarchical record sets. SqlServer is a pure relational engine and only returns sets (expect for xml or json results).
you probably want to look an ORM like entity framework which maps sets into hierarchies.