Suppose I am working with a graph database from this example (SQL Server 2017):
https://docs.microsoft.com/en-us/sql/relational-databases/graphs/sql-graph-sample
I have the following SQL query:
SELECT Restaurant.name
FROM Person, likes, Restaurant
WHERE MATCH (Person-(likes)->Restaurant)
AND Person.name = 'John';
I created a model in C # using EF 6.1.3, and it automatically generates all classes and everything from the database (EF Designer from the database). This all works great. I can even interview all people using a simple method such as:
public ICollection<People> ListPeople() => Entities.Peoples.ToList();
, , , ... Entity Framework? LINQ ? (-, , , , , )
-
public ICollection<Restaurant> ListRestaurantsLikedByPerson(string personName)
{
var result = from restaurant in Entities.Restaurants, person in Entities.Peoples, likes in Entities.likess
where match (person - likes -> restaurant)
and person.name = personName;
return result;
}
... ?