Write some code

Image

Now that we have the model in place, let’s try it out. We’ll write a little LINQ query that just prints out the title and description of each recipe in the database.

Add the following code to the program.cs or Module1.vb file that Visual Studio created for you when you created the project. You might have to reopen it from the Solution Explorer if you’ve closed and reopened the project:

Image
Image

Once you have the code typed in, run the ...

Get Fluent Entity Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.