Go ahead and install the entityframework.
dotnet add package Microsoft.EntityFrameworkCore.InMemory dotnet add package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
With this done we can now create a new class that is our model for an todo app and also create the database context class file.
New-Item -Name Todo.cs New-Item -Name TodoDb.cs
Paste both code into each code file. Remember you can get the information from here.
Finally replace our boilerplate code for the asp.net web app with our API code. As you can see the code contains function for each task such as get, put, post and delete.
In the final post we´ll go through and work with our new api and in memory database from entityframework.