diff --git a/README.md b/README.md index 3e62dee..adbe381 100644 --- a/README.md +++ b/README.md @@ -151,4 +151,11 @@ This is the least recommended method of loading data. It requires the [Microsoft * A **Team** has one **Coach** (1:1) * **Matches** are played by many **Teams** (M:M) -You can use [EF Core Power Tools](https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools) to create diagrams. \ No newline at end of file +You can use [EF Core Power Tools](https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools) to create diagrams. + +## ASP.NET Core with Entity Framework Core + +A web application will make connection to the database on demand, which is a scoped connection. When not using the database, the web application is in a disconnected state. +You cannot create a new context in a file, because a new connection needs to be established every time and also closed, when the database is no longer needed. Also, *no tracking* is recommended, because multiple people can manipulate data. + +An Inversion of Control (IoC) container will be used to handle dependancy injection for the DbContext. And also the DbContext will need a constructor with parameters to initialize itself properly.