diff --git a/docs/ai/ai-extensions.md b/docs/ai/ai-extensions.md index 62afd7f8ac982..58f2dfce0c808 100644 --- a/docs/ai/ai-extensions.md +++ b/docs/ai/ai-extensions.md @@ -45,7 +45,7 @@ IChatClient client =     new AzureAIInferenceChatClient(...); ``` -Then, regardless of the provider you're using, you can send requests by calling , as follows: +Then, regardless of the provider you're using, you can send requests by calling , as follows: ```csharp var response = await chatClient.GetResponseAsync( diff --git a/docs/architecture/cloud-native/logging-with-elastic-stack.md b/docs/architecture/cloud-native/logging-with-elastic-stack.md index 4ba26339c7d74..9c34c173d90c3 100644 --- a/docs/architecture/cloud-native/logging-with-elastic-stack.md +++ b/docs/architecture/cloud-native/logging-with-elastic-stack.md @@ -8,13 +8,13 @@ ms.date: 04/06/2022 [!INCLUDE [download-alert](includes/download-alert.md)] -There are many good centralized logging tools and they vary in cost from being free, open-source tools, to more expensive options. In many cases, the free tools are as good as or better than the paid offerings. One such tool is a combination of three open-source components: Elasticsearch, Logstash, and Kibana. +There are many good centralized logging tools and they vary in cost from free, open-source tools, to more expensive options. In many cases, the free tools are as good as or better than the paid offerings. One such tool is a combination of three open-source components: Elasticsearch, Logstash, and Kibana. Collectively these tools are known as the Elastic Stack or ELK stack. ## Elastic Stack -The Elastic Stack is a powerful option for gathering information from a Kubernetes cluster. Kubernetes supports sending logs to an Elasticsearch endpoint, and for the [most part](https://www.elastic.co/guide/en/kibana/master/logging-configuration.html), all you need to get started is to set the environment variables as shown in Figure 7-5: +The Elastic Stack is a powerful option for gathering information from a Kubernetes cluster. Kubernetes supports sending logs to an Elasticsearch endpoint, and for the most part, all you need to get started is to set the environment variables as shown in Figure 7-5: ```kubernetes KUBE_LOGGING_DESTINATION=elasticsearch @@ -28,6 +28,8 @@ This step will install Elasticsearch on the cluster and target sending all the c ![An example of a Kibana dashboard showing the results of a query against logs ingested from Kubernetes](./media/kibana-dashboard.png) **Figure 7-6**. An example of a Kibana dashboard showing the results of a query against logs that are ingested from Kubernetes +For more information about configuration, see [Configure logging (Kibana)](https://www.elastic.co/guide/en/kibana/current/logging-configuration.html). + ## What are the advantages of Elastic Stack? Elastic Stack provides centralized logging in a low-cost, scalable, cloud-friendly manner. Its user interface streamlines data analysis so you can spend your time gleaning insights from your data instead of fighting with a clunky interface. It supports a wide variety of inputs so as your distributed application spans more and different kinds of services, you can expect to continue to be able to feed log and metric data into the system. The Elastic Stack also supports fast searches even across large data sets, making it possible even for large applications to log detailed data and still be able to have visibility into it in a performant fashion. diff --git a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/seedwork-domain-model-base-classes-interfaces.md b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/seedwork-domain-model-base-classes-interfaces.md index 9853ed0ecf6dc..6326dfbc7cc9c 100644 --- a/docs/architecture/microservices/microservice-ddd-cqrs-patterns/seedwork-domain-model-base-classes-interfaces.md +++ b/docs/architecture/microservices/microservice-ddd-cqrs-patterns/seedwork-domain-model-base-classes-interfaces.md @@ -7,9 +7,9 @@ ms.date: 10/08/2018 [!INCLUDE [download-alert](../includes/download-alert.md)] -The solution folder contains a *SeedWork* folder. This folder contains custom base classes that you can use as a base for your domain entities and value objects. Use these base classes so you don't have redundant code in each domain's object class. The folder for these types of classes is called *SeedWork* and not something like *Framework*. It's called *SeedWork* because the folder contains just a small subset of reusable classes that cannot really be considered a framework. *Seedwork* is a term introduced by [Michael Feathers](https://www.artima.com/forums/flat.jsp?forum=106&thread=8826) and popularized by [Martin Fowler](https://martinfowler.com/bliki/Seedwork.html) but you could also name that folder Common, SharedKernel, or similar. +The solution folder contains a *SeedWork* folder. This folder contains custom base classes that you can use as a base for your domain entities and value objects. Use these base classes so you don't have redundant code in each domain's object class. The folder for these types of classes is called *SeedWork* and not something like *Framework*. It's called *SeedWork* because the folder contains just a small subset of reusable classes that cannot really be considered a framework. *Seedwork* is a term introduced by Michael Feathers and popularized by [Martin Fowler](https://martinfowler.com/bliki/Seedwork.html), but you could also name that folder Common, SharedKernel, or similar. -Figure 7-12 shows the classes that form the seedwork of the domain model in the ordering microservice. It has a few custom base classes like Entity, ValueObject, and Enumeration, plus a few interfaces. These interfaces (IRepository and IUnitOfWork) inform the infrastructure layer about what needs to be implemented. Those interfaces are also used through Dependency Injection from the application layer. +Figure 7-12 shows the classes that form the seedwork of the domain model in the ordering microservice. It has a few custom base classes like `Entity`, `ValueObject`, and `Enumeration`, plus a few interfaces. These interfaces (`IRepository` and `IUnitOfWork`) inform the infrastructure layer about what needs to be implemented. Those interfaces are also used through Dependency Injection from the application layer. :::image type="complex" source="./media/seedwork-domain-model-base-classes-interfaces/vs-solution-seedwork-classes.png" alt-text="Screenshot of the classes contained in the SeedWork folder."::: The detailed contents of the SeedWork folder, containing base classes and interfaces: Entity.cs, Enumeration.cs, IAggregateRoot.cs, IRepository.cs, IUnitOfWork.cs, and ValueObject.cs. diff --git a/docs/core/diagnostics/observability-with-otel.md b/docs/core/diagnostics/observability-with-otel.md index 250e594ffb9d0..8e7d2572b16bc 100644 --- a/docs/core/diagnostics/observability-with-otel.md +++ b/docs/core/diagnostics/observability-with-otel.md @@ -96,7 +96,7 @@ This topic is continued with a couple of example walkthroughs for using OpenTele [.NET Aspire](/dotnet/aspire/get-started/aspire-overview) is a set of extensions to .NET to make it easy to create and work with distributed applications. One of the benefits of using .NET Aspire is that telemetry is built in, using the OpenTelemetry libraries for .NET. The default project templates for .NET Aspire contain a `ServiceDefaults` project, part of which is to setup and configure OTel. The Service Defaults project is referenced and initialized by each service in a .NET Aspire solution. -The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient and Runtime Instrumentation packages, and those are configured in the [`Extensions.cs`](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.0/Extensions.cs) file. For exporting telemetry .NET Aspire includes the OTLP exporter by default so that it can provide telemetry visualization using the Aspire Dashboard. +The Service Defaults project template includes the OTel SDK, ASP.NET, HttpClient and Runtime Instrumentation packages, and those are configured in the [`Extensions.cs`](https://github.com/dotnet/aspire/blob/main/src/Aspire.ProjectTemplates/templates/aspire-servicedefaults/9.2/Extensions.cs) file. For exporting telemetry .NET Aspire includes the OTLP exporter by default so that it can provide telemetry visualization using the Aspire Dashboard. The Aspire Dashboard is designed to bring telemetry observation to the local debug cycle, which enables developers to not only ensure that the applications are producing telemetry, but also use that telemetry to diagnose those applications locally. Being able to observe the calls between services is proving to be just as useful at debug time as in production. The .NET Aspire dashboard is launched automatically when you F5 the `AppHost` Project from Visual Studio or `dotnet run` the `AppHost` project. diff --git a/docs/core/install/linux-ubuntu.md b/docs/core/install/linux-ubuntu.md index e615a4b718b21..abe99902eb9ff 100644 --- a/docs/core/install/linux-ubuntu.md +++ b/docs/core/install/linux-ubuntu.md @@ -151,7 +151,7 @@ Depending on your version of Ubuntu, you might need to register either the Ubunt The Ubuntu .NET backports package repository provides versions of .NET that aren't available in the built-in Ubuntu feed. The [Supported distributions](#supported-distributions) section provides a table that lists which versions of .NET are available in the package feed. Canonical maintains the packages contained in this package repository and provides best-effort support, which does not extend beyond the Microsoft-provided support lifetime or the support period of the particular Ubuntu version. -See the [web-view of the Ubuntu .NET backports package repository](https://launchpad.net/~dotnet/+archive/ubuntu/backports) for more details. +For more information, see the [web-view of the Ubuntu .NET backports package repository](https://launchpad.net/~dotnet/+archive/ubuntu/backports). #### Register the Ubuntu .NET backports package repository diff --git a/docs/core/whats-new/dotnet-10/overview.md b/docs/core/whats-new/dotnet-10/overview.md index fc75361c61f56..488679d9893ae 100644 --- a/docs/core/whats-new/dotnet-10/overview.md +++ b/docs/core/whats-new/dotnet-10/overview.md @@ -172,7 +172,7 @@ The F# updates in .NET 10 include several new features and improvements across t - **FSharp.Compiler.Service**: - General improvements and bug fixes in the compiler implementation. -For more information, see the [F# release notes](https://fsharp.github.io/fsharp-compiler-docs/release-notes/). +For more information, see the [F# release notes](https://fsharp.github.io/fsharp-compiler-docs/release-notes/About.html). ## Visual Basic @@ -183,7 +183,7 @@ The Visual Basic updates in .NET 10 include the following features and enhanceme These updates ensure that Visual Basic can consume updated features in C# and the runtime, improving compatibility and performance. -For more information, see [What's new in Visual Basic](https://learn.microsoft.com/dotnet/visual-basic/whats-new/). +For more information, see [What's new in Visual Basic](/dotnet/visual-basic/whats-new/). ## Windows Forms @@ -196,7 +196,7 @@ Changes in Windows Forms for .NET 10 include: - Unified Clipboard code with WPF to enhance consistency and reliability. - **Ported UITypeEditors**: - - Ported several `UITypeEditors` from the .NET Framework, including `ToolStripCollectionEditor` and editors related to the `DataGridView` control. + - Ported several `UITypeEditors` from .NET Framework, including `ToolStripCollectionEditor` and editors related to the `DataGridView` control. - **Quality enhancements**: - Expanded unit test coverage and addressed various bug fixes to improve stability and performance. diff --git a/docs/csharp/modern-events.md b/docs/csharp/modern-events.md index 50757132d7b06..1503d8bfa8289 100644 --- a/docs/csharp/modern-events.md +++ b/docs/csharp/modern-events.md @@ -4,13 +4,13 @@ description: Learn how the .NET Core event pattern enables flexibility with back ms.date: 03/11/2025 ms.subservice: fundamentals --- -# The Updated .NET Core Event Pattern +# The updated .NET Core event pattern [Previous](event-pattern.md) The previous article discussed the most common event patterns. .NET Core has a more relaxed pattern. In this version, the `EventHandler` definition no longer has the constraint that `TEventArgs` must be a class derived from `System.EventArgs`. -This increases flexibility for you, and is backwards compatible. Let's start with the flexibility. The implementation for uses a method defiend in one method: , which creates a shallow copy of the object. That method must use reflection in order to implement its functionality for any class derived from `EventArgs`. That functionality is easier to create in a specific derived class. That effectively means that deriving from System.EventArgs is a constraint that limits your designs, but doesn't provide any extra benefit. In fact, you can change the definitions of `FileFoundArgs` and `SearchDirectoryArgs` so that they don't derive from `EventArgs`. The program works exactly the same. +This increases flexibility for you, and is backwards compatible. Let's start with the flexibility. The implementation for uses a method defined in one method: , which creates a shallow copy of the object. That method must use reflection in order to implement its functionality for any class derived from `EventArgs`. That functionality is easier to create in a specific derived class. That effectively means that deriving from System.EventArgs is a constraint that limits your designs, but doesn't provide any extra benefit. In fact, you can change the definitions of `FileFoundArgs` and `SearchDirectoryArgs` so that they don't derive from `EventArgs`. The program works exactly the same. You could also change the `SearchDirectoryArgs` to a struct, if you make one more change: @@ -36,7 +36,7 @@ First, notice that the handler is marked as an async handler. Because it's being You should wrap the `await` expression for the async Task in your own try block. If it does cause a faulted task, you can log the error. If it's an error from which your application can't recover, you can exit the program quickly and gracefully -This article explained the major updates to the .NET event pattern. You might see many examples of the earlier versions in the libraries you work with. However, you should understand what the latest patterns are as well. You can see the finished code for the sample in our [Samples repository](https://github.com/dotnet/docs/blob/main/samples/snippets/csharp/events/Program.cs) on GitHub. +This article explained the major updates to the .NET event pattern. You might see many examples of the earlier versions in the libraries you work with. However, you should understand what the latest patterns are as well. You can see the finished code for the sample at [Program.cs](https://github.com/dotnet/docs/blob/main/docs/csharp/snippets/events/Program.cs). The next article in this series helps you distinguish between using `delegates` and `events` in your designs. They're similar concepts, and that article helps you make the best decision for your programs. diff --git a/docs/framework/tools/sqlmetal-exe-code-generation-tool.md b/docs/framework/tools/sqlmetal-exe-code-generation-tool.md index 7a6fe0ef993dc..d213c828b242d 100644 --- a/docs/framework/tools/sqlmetal-exe-code-generation-tool.md +++ b/docs/framework/tools/sqlmetal-exe-code-generation-tool.md @@ -2,133 +2,128 @@ title: "SqlMetal.exe (Code Generation Tool)" description: Understand SqlMetal.exe, the code generation tool. Use the tool to generate code and mapping for the LINQ to SQL component of .NET. ms.date: "03/30/2017" -helpviewer_keywords: +helpviewer_keywords: - "SQLMetal [LINQ to SQL]" - "code generation tool" - "SQLMetal.exe" - "LINQ to SQL, serialization" - "LINQ to SQL, DBML files" - "LINQ to SQL, SQLMetal" -ms.assetid: 819e5a96-7646-4fdb-b14b-fe31221b0614 --- # SqlMetal.exe (Code Generation Tool) -The SqlMetal command-line tool generates code and mapping for the [!INCLUDE[vbtecdlinq](../../../includes/vbtecdlinq-md.md)] component of the .NET Framework. By applying options that appear later in this topic, you can instruct SqlMetal to perform several different actions that include the following: - -- From a database, generate source code and mapping attributes or a mapping file. - -- From a database, generate an intermediate database markup language (.dbml) file for customization. - -- From a .dbml file, generate code and mapping attributes or a mapping file. - -This tool is automatically installed with Visual Studio 2019 and earlier versions. By default, the file is located at *%ProgramFiles%\Microsoft SDKs\Windows\[version]\bin*. If you don't install Visual Studio, you can also get the SQLMetal file by downloading the [Windows SDK](https://www.microsoft.com/download/details.aspx?id=8279). - +The SqlMetal command-line tool generates code and mapping for the LINQ to SQL component of .NET Framework. By applying options that appear later in this article, you can instruct SqlMetal to perform several different actions that include the following: + +- From a database, generate source code and mapping attributes or a mapping file. +- From a database, generate an intermediate database markup language (.dbml) file for customization. +- From a .dbml file, generate code and mapping attributes or a mapping file. + +This tool is automatically installed with Visual Studio 2019 and earlier versions. By default, the file is located at *%ProgramFiles%\Microsoft SDKs\Windows\[version]\bin*. If you don't install Visual Studio, you can also get the SQLMetal file by downloading the [Windows SDK](https://developer.microsoft.com/windows/downloads/windows-sdk/). + > [!NOTE] -> Developers who use Visual Studio can also use the Object Relational Designer to generate entity classes. The command-line approach scales well for large databases. Because SqlMetal is a command-line tool, you can use it in a build process. - +> Developers who use Visual Studio can also use the Object Relational Designer to generate entity classes. The command-line approach scales well for large databases. Because SqlMetal is a command-line tool, you can use it in a build process. + To run the tool, use [Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell](/visualstudio/ide/reference/command-prompt-powershell). At the command prompt, enter the following command: -```console -sqlmetal [options] [] -``` - -## Options - - To view the most current option list, type `sqlmetal /?` at a command prompt from the installed location. - - **Connection Options** - -|Option|Description| -|------------|-----------------| -|**/server:** *\*|Specifies database server name.| -|**/database:** *\*|Specifies database catalog on server.| -|**/user:** *\*|Specifies logon user id. Default value: Use Windows authentication.| -|**/password:** *\*|Specifies logon password. Default value: Use Windows authentication.| -|**/conn:** *\*|Specifies database connection string. Cannot be used with **/server**, **/database**, **/user**, or **/password** options.

Do not include the file name in the connection string. Instead, add the file name to the command line as the input file. For example, the following line specifies "c:\northwnd.mdf" as the input file: **sqlmetal /code:"c:\northwind.cs" /language:csharp "c:\northwnd.mdf"**.| -|**/timeout:** *\*|Specifies time-out value when SqlMetal accesses the database. Default value: 0 (that is, no time limit).| - - **Extraction options** - -|Option|Description| -|------------|-----------------| -|**/views**|Extracts database views.| -|**/functions**|Extracts database functions.| -|**/sprocs**|Extracts stored procedures.| - - **Output options** - -|Option|Description| -|------------|-----------------| -|**/dbml** *[:file]*|Sends output as .dbml. Cannot be used with **/map** option.| -|**/code** *[:file]*|Sends output as source code. Cannot be used with **/dbml** option.| -|**/map** *[:file]*|Generates an XML mapping file instead of attributes. Cannot be used with **/dbml** option.| - - **Miscellaneous** - -|Option|Description| -|------------|-----------------| -|**/language:** *\*|Specifies source code language.

Valid *\*: vb, csharp.

Default value: Derived from extension on code file name.| -|**/namespace:** *\*|Specifies namespace of the generated code. Default value: no namespace.| -|**/context:** *\*|Specifies name of data context class. Default value: Derived from database name.| -|**/entitybase:** *\*|Specifies the base class of the entity classes in the generated code. Default value: Entities have no base class.| -|**/pluralize**|Automatically pluralizes or singularizes class and member names.

This option is available only in the U.S. English version.| -|**/serialization:** *\