Hi,
I am not familar with .NET Core and Entity Framework Core, hope more relevant experts would help you.
About the SQL Graph T-SQL sample script you can refer to following articles:
Create a graph database and run some pattern matching queries using T-SQL and SHORTEST_PATH (Transact-SQL)
SQL Server Graph Databases – Part 2: Querying Data in a Graph Database
===============================================
If the response helped, do "Accept Answer" and upvote it.