You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/dotnet-isolated-in-process-differences.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ recommendations: false
9
9
#Customer intent: As a developer, I need to understand the differences between running in-process and running in an isolated worker process so that I can choose the best process model for my functions.
10
10
---
11
11
12
-
# Differences between in-process and isolated worker process .NET Azure Functions
12
+
# Differences between isolated worker model and in-process model .NET Azure Functions
13
13
14
14
There are two process models for .NET functions:
15
15
@@ -21,23 +21,23 @@ This article describes the current state of the functional and behavioral differ
21
21
22
22
Use the following table to compare feature and functional differences between the two models:
23
23
24
-
| Feature/behavior |In-process<sup>3</sup>| Isolated worker process |
24
+
| Feature/behavior |Isolated worker process |In-process<sup>3</sup> |
25
25
| ---- | ---- | ---- |
26
-
|[Supported .NET versions](#supported-versions)| Long Term Support (LTS) versions<sup>6</sup>| Long Term Support (LTS) versions<sup>6</sup>,<br/>Standard Term Support (STS) versions,<br/>.NET Framework|
| Durable Functions |[Supported](durable/durable-functions-overview.md)|[Supported](durable/durable-functions-isolated-create-first-csharp.md?pivots=code-editor-visualstudio) (Support does not yet include Durable Entities) |
| Output binding interactions | Return values (single output only),<br/>`out` parameters,<br/>`IAsyncCollector`| Return values in an expanded model with:<br/> - single or [multiple outputs](dotnet-isolated-process-guide.md#multiple-output-bindings)<br/> - arrays of outputs|
| Logging |[ILogger] passed to the function<br/>[ILogger<T>] via [dependency injection](functions-dotnet-dependency-injection.md)|[ILogger<T>]/[ILogger] obtained from [FunctionContext](/dotnet/api/microsoft.azure.functions.worker.functioncontext) or via [dependency injection](dotnet-isolated-process-guide.md#dependency-injection)|
|[Supported .NET versions](#supported-versions)| Long Term Support (LTS) versions<sup>6</sup>,<br/>Standard Term Support (STS) versions,<br/>.NET Framework | Long Term Support (LTS) versions<sup>6</sup>|
| Durable Functions |[Supported](durable/durable-functions-isolated-create-first-csharp.md?pivots=code-editor-visualstudio) (Support does not yet include Durable Entities) |[Supported](durable/durable-functions-overview.md)|
| Output binding interactions | Return values in an expanded model with:<br/> - single or [multiple outputs](dotnet-isolated-process-guide.md#multiple-output-bindings)<br/> - arrays of outputs| Return values (single output only),<br/>`out` parameters,<br/>`IAsyncCollector`|
33
+
| Imperative bindings<sup>1</sup> | Not supported - instead [work with SDK types directly](./dotnet-isolated-process-guide.md#register-azure-clients)|[Supported](functions-dotnet-class-library.md#binding-at-runtime)|
34
+
| Dependency injection |[Supported](dotnet-isolated-process-guide.md#dependency-injection) (improved model consistent with .NET ecosystem)|[Supported](functions-dotnet-dependency-injection.md)|
35
+
| Middleware |[Supported](dotnet-isolated-process-guide.md#middleware)| Not supported|
36
+
| Logging |[ILogger<T>]/[ILogger] obtained from [FunctionContext](/dotnet/api/microsoft.azure.functions.worker.functioncontext) or via [dependency injection](dotnet-isolated-process-guide.md#dependency-injection)|[ILogger] passed to the function<br/>[ILogger<T>] via [dependency injection](functions-dotnet-dependency-injection.md)|
<sup>1</sup> When you need to interact with a service using parameters determined at runtime, using the corresponding service SDKs directly is recommended over using imperative bindings. The SDKs are less verbose, cover more scenarios, and have advantages for error handling and debugging purposes. This recommendation applies to both models.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-add-output-binding-azure-sql-vs-code.md
+46-46Lines changed: 46 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,13 +89,13 @@ Because you're using an Azure SQL output binding, you must have the correspondin
89
89
90
90
With the exception of HTTP and timer triggers, bindings are implemented as extension packages. Run the following [dotnet add package](/dotnet/core/tools/dotnet-add-package) command in the Terminal window to add the Azure SQL extension package to your project.
@@ -131,14 +131,7 @@ Open the *HttpExample.cs* project file and add the following `ToDoItem` class, w
131
131
132
132
In a C# class library project, the bindings are defined as binding attributes on the function method. The *function.json* file required by Functions is then auto-generated based on these attributes.
133
133
134
-
# [In-process](#tab/in-process)
135
-
Open the *HttpExample.cs* project file and add the following parameter to the `Run` method definition:
The `toDoItems` parameter is an `IAsyncCollector<ToDoItem>` type, which represents a collection of ToDo items that are written to your Azure SQL Database when the function completes. Specific attributes indicate the names of the database table (`dbo.ToDo`) and the connection string for your Azure SQL Database (`SqlConnectionString`).
140
-
141
-
# [Isolated process](#tab/isolated-process)
134
+
# [Isolated worker model](#tab/isolated-process)
142
135
143
136
Open the *HttpExample.cs* project file and add the following output type class, which defines the combined objects that will be output from our function for both the HTTP response and the SQL output:
144
137
@@ -157,6 +150,13 @@ Add a using statement to the `Microsoft.Azure.Functions.Worker.Extensions.Sql` l
The `toDoItems` parameter is an `IAsyncCollector<ToDoItem>` type, which represents a collection of ToDo items that are written to your Azure SQL Database when the function completes. Specific attributes indicate the names of the database table (`dbo.ToDo`) and the connection string for your Azure SQL Database (`SqlConnectionString`).
159
+
160
160
---
161
161
162
162
::: zone-end
@@ -247,7 +247,40 @@ In this code, `arg_name` identifies the binding parameter referenced in your cod
247
247
248
248
::: zone pivot="programming-language-csharp"
249
249
250
-
# [In-process](#tab/in-process)
250
+
# [Isolated worker model](#tab/isolated-process)
251
+
252
+
Replace the existing Run method with the following code:
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-add-output-binding-cosmos-db-vs-code.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,13 +94,13 @@ Because you're using an Azure Cosmos DB output binding, you must have the corres
94
94
95
95
Except for HTTP and timer triggers, bindings are implemented as extension packages. Run the following [dotnet add package](/dotnet/core/tools/dotnet-add-package) command in the Terminal window to add the Azure Cosmos DB extension package to your project.
The `documentsOut` parameter is an `IAsyncCollector<T>` type, which represents a collection of JSON documents that are written to your Azure Cosmos DB container when the function completes. Specific attributes indicate the names of the container and its parent database. The connection string for your Azure Cosmos DB account is set by the `ConnectionStringSettingAttribute`.
130
-
131
-
# [Isolated process](#tab/isolated-process)
124
+
# [Isolated worker model](#tab/isolated-process)
132
125
133
126
Open the *HttpExample.cs* project file and add the following classes:
134
127
@@ -138,6 +131,13 @@ The `MyDocument` class defines an object that gets written to the database. The
138
131
139
132
The `MultiResponse` class allows you to both write to the specified collection in the Azure Cosmos DB and return an HTTP success message. Because you need to return a `MultiResponse` object, you need to also update the method signature.
140
133
134
+
# [In-process model](#tab/in-process)
135
+
Open the *HttpExample.cs* project file and add the following parameter to the `Run` method definition:
The `documentsOut` parameter is an `IAsyncCollector<T>` type, which represents a collection of JSON documents that are written to your Azure Cosmos DB container when the function completes. Specific attributes indicate the names of the container and its parent database. The connection string for your Azure Cosmos DB account is set by the `ConnectionStringSettingAttribute`.
140
+
141
141
---
142
142
143
143
Specific attributes specify the name of the container and the name of its parent database. The connection string for your Azure Cosmos DB account is set by the `CosmosDbConnectionString`.
@@ -233,7 +233,13 @@ In this code, `arg_name` identifies the binding parameter referenced in your cod
233
233
234
234
::: zone pivot="programming-language-csharp"
235
235
236
-
# [In-process](#tab/in-process)
236
+
# [Isolated worker model](#tab/isolated-process)
237
+
238
+
Replace the existing Run method with the following code:
0 commit comments