daveharney (15) [Avatar] Offline
#1
This is a great chapter in a couple of different ways:

First of all, it does an excellent job of explaining the basic concepts for getting up and running with EF Core. The tutorial for using the .NET CLI tools was really appreciated. However, getting to the correct directory is a pain. I recall using a short cut method for getting to this directory. One method is to put a unique file in the project and then use “c:\>dir /S myCh12Notes.txt” – but I think there is an easier way?

Next is the fact that the sample code works flawlessly –a pet peeve of mine is buying a book that has samples that either don’t work or need a lot of fooling around to get running on my machine. One suggestion before running the sample (see page 352) is to have the reader actually look at the default connection string in appsettings to see how it’s used in this sample.

And, a big plus for this chapter is the organization of the sample itself. Page 346, chapter 12.2, barely mentions this sample – I’d strongly suggest that the reader be encouraged to run this app and follow it carefully while reading chapter 12. This sample illustrates a significant number of “best practices” and coding techniques – I plan to use this outline for my next project.

This chapter is not a quick and simple read! But, I found it to be very information rich.
Andrew Lock (51) [Avatar] Offline
#2
Hi Dave,

Thanks so much for the kind words smilie glad you found it useful!

However, getting to the correct directory is a pain. I recall using a short cut method for getting to this directory. One method is to put a unique file in the project and then use “c:\>dir /S myCh12Notes.txt” – but I think there is an easier way?


I wasn't aware of that trick - so thanks for that! I use a couple of approaches, depending on where I am.

- From Windows Explorer: Hold shift, and right click in an empty space. You should see "Open Command Prompt here" or "Open PowerShell window here" (depending on your version of windows and settings)
- From Visual Studio: Right click the folder and choose "Open folder in Windows Explorer". Then use the trick above.
- From Visual Studio: Alternatively, click Tools > Nuget Package Manager > Package Manager Console. Opens a Powershell console in the solution directory (Remember you need to change directory to the project folder to execute project-specific commands like dotnet run and dotnet test
- From Visual Studio Code: Toggle the integrated terminal!

I’d strongly suggest that the reader be encouraged to run this app and follow it carefully while reading chapter 12.


I'll be sure to point readers to the sample, thanks smilie

Andrew