languages | products | page_type | name | urlFragment | description | |||
---|---|---|---|---|---|---|---|---|
|
|
sample |
Code and notes for Entity Framework Core for Beginners video series |
ef-core-for-beginners |
All the notes and code samples to follow along with the Entity Framework Core for Beginners video series. |
Hi, friend! 👋 You've found the code and other materials to accompany the Entity Framework Core for Beginners video series. We hope you'll find it enjoyable and informative. 💜
The starter project for each video is located in the corresponding folder under the parts folder. For example, the starter project for Getting Started with Entity Framework Core (Part 1 of 5) is located in parts/1-getting-started.
The script, code snippets, and connection strings used for each video are located in the notes folder, organized by parts. For example, the notes for Part 1 are located in notes/1-getting-started.
If you want to code along with the videos, we strongly recommend you first watch the supplemental video, How to code along with these videos.
The courseware was designed to be followed in one of three scenarios:
- Windows with Visual Studio
- Windows/macOS/Linux with .NET CLI and Visual Studio Code
- Windows/macOS/Linux with Docker/containers and Visual Studio Code -- Recommended scenario, in-browser option available
This is the scenario featured in the video. This scenario requires:
- Clone the repository.
- Install the ContosoPizza database in your LocalDB instance. Use a tool like Azure Data Studio or SQL Server Management Studio.
- For each video (parts 1-5), open the desired project file in Visual Studio. Follow along in the videos.
This scenario uses open source tooling and supports any operating system. This scenario requires:
- Visual Studio Code (please install the recommended extensions--An extensions.json has been provided)
- .NET 6 SDK
- A SQL Server instance (cloud is acceptable)
- A PostgreSQL instance (cloud is acceptable)
You are responsible for determining your own connection information for all of the above.
- Clone the repository.
- Install the ContosoPizza database on an accessible SQL Server instance. Use a tool like Azure Data Studio or SQL Server Management Studio.
- Open the entire repository folder in Visual Studio Code.
- Review the recommended extensions and install them.
- When everything is done loading, find the CodeTour for the video you're watching in the CODETOUR pane in the EXPLORER in VS Code. Right-click on the CodeTour and select Start Tour to begin the walkthrough. The walkthrough is in English and follows the videos step-by-step (with additional information and links).
This scenario uses open source tooling and supports any operating system. The development container includes ALL prerequisties, including SQL Server, PostgreSQL, .NET SDK, and more. The ContosoPizza SQL Server database is also pre-configured. This is the recommended scenario.
This scenario requires:
- Visual Studio Code with the Remote Development - Containers extension
- A compatible container environment. See Visual Studio Code documentation for more.
- Clone the repository.
- Open Visual Studio Code without opening a folder.
- Press Ctrl+Shift+P to open the command palette. Search for and select Remote Containers-Open Folder in Container.... Select the entire repository folder.
- When everything is done loading, find the CodeTour for the video you're watching in the CODETOUR pane in the EXPLORER in VS Code. Right-click on the CodeTour and select Start Tour to begin the walkthrough. The walkthrough is in English and follows the videos step-by-step (with additional information and links). See the animation above to see an example of launching a CodeTour.
Alternatively, this scenario can be completed in-browser with no local tools using GitHub Codespaces.
- Just navigate to the repository, select Code, and create a new Codespace using the
main
branch. - When everything is done loading, locate the CodeTour pane in the explorer, find the CodeTour for the video you're watching, and launch as described above.
Video series courseware repository
- Starter project
- Notes and code snippets
- Migrations Overview
- Null safety in C# (Microsoft Learn)
- Persist and retrieve relational data with Entity Framework Core (Microsoft Learn)
- Starter project
- Notes and code snippets
- Safe storage of app secrets in development in ASP.NET Core
- Tutorial: Create a Razor Pages web app with ASP.NET Core
- Connection Strings (Entity Framework Core docs)
- Starter project
- Notes and code snippets
- Full list of database providers.
- DB Browser for SQLite
- PostgreSQL
- Quickstart: Create an Azure Cosmos account, database, container, and items from the Azure portal
- Azure Cosmos DB local emulator
- Free Azure Account
- Starter project
- Notes and code snippets
- No-tracking queries
- Loading related data
- Split queries
DbContext
pooling- Raw SQL queries
- CodeTour extension
- SQL Server Express Local DB
- Download and install Azure Data Studio
- Developing inside a container (Visual Studio Code)
- GitHub Codespaces (Visual Studio Code)
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.
Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
Privacy information can be found at https://privacy.microsoft.com/en-us/
Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.