.NET 5 Entity Framework Sample (Azure Functions)

Setup

  1. Clone the repo
  2. Rename local.settings.sample.json to local.settings.json and fill in connection strings
  3. Install the dontnet-ef tool: dotnet tool install --global dotnet-ef
  4. Set the connection string for migration $env:SqlConnectionString="Server=tcp:my.database.windows.net,1433;......"
  5. Create the initial migration dotnet ef migrations add initial
  6. Update the database dotnet ef database update
  7. Run the function project with func start
  8. Call the different operations in the ./test.http file (I use RESTClient for VS Code)