Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeffhollan/functions-csharp-entityframeworkcore

C# Function that uses dependency injection and entity framework core with Azure SQL
https://github.com/jeffhollan/functions-csharp-entityframeworkcore

Last synced: 3 months ago
JSON representation

C# Function that uses dependency injection and entity framework core with Azure SQL

Awesome Lists containing this project

README

        

# Interested in .NET 5?

Link to a sample using Entity Framework 5 in Azure Functions: https://github.com/jeffhollan/functions-net5-entityframework

# .NET Core Entity Framework and functions

C# Function that uses dependency injection and entity framework core with Azure SQL. A few things of note:

I want to use design-first migration, so I created a `IDesignTimeDbContextFactory` for the tooling to generate the right `DbContext`.

I also had to add a post-build step to the `.csproj` file to make sure the `.dll` for the project is where the entity framework tooling expected:

```xml

```