Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entity-framework/core/get-started/winforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The application will show a list of categories and a list of products. When a ca
4. In the **Properties** for the first `DataGridView`, change the **Name** to `dataGridViewCategories`.
5. In the **Properties** for the second `DataGridView`, change the **Name** to `dataGridViewProducts`.
6. Also using the **Toolbox**, add a `Button` control.
7. Name the button `buttonSave` and give it the text "Save". The form should look something this this:
7. Name the button `buttonSave` and give it the text "Save". The form should look something like this:

![Form layout](_static/winforms-form-layout.png)

Expand Down
12 changes: 12 additions & 0 deletions entity-framework/core/learn-more/community-standups.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The .NET Data Community Standups are live-streamed monthly (roughly) on Thursday

| Date | Area | Title |
|--------------|-----------------------|------------------------------------------------------------------------------------------|
| Jun 25, 2026 | Temporal tables | [Temporal tables and constraints in SQL Server and PostgreSQL 18](#Jun25_2026) |
| May 21, 2026 | EF Core | [8 Real-World Query Anti-Patterns (and How to Fix Them)](#May21_2026) |
| Apr 23, 2026 | Tools | [Lightweight Framework to Automate EF Components](#Apr23_2026) |
| Mar 19, 2026 | DevArt | [How dotConnect + Entity Developer simplify your workflow](#Mar19_2026) |
Expand Down Expand Up @@ -112,6 +113,17 @@ The .NET Data Community Standups are live-streamed monthly (roughly) on Thursday

## 2026

<a name="Jun25_2026"></a>

### Jun 25: [Temporal tables and constraints in SQL Server and PostgreSQL 18](https://www.youtube.com/live/BcbhBFm1MuU?si=qczW0FmktU9xq3c3)

In this session we'll take a deep look at temporal tables and constraints in database. The recently-released PostgreSQL 18 contains new temporal constraint functionality that superficially looks similar to SQL Server's temporal tables, but the two are in reality quite different. We'll dive into the details, compare the two and discuss two completely different concepts of what it means to store temporal data in databases.

Featuring:

- [Shay Rojansky](https://www.roji.org/) (Special guest)
- [Jiri Cincura](https://www.tabsoverspaces.com/) (Host)

<a name="May21_2026"></a>

### May 21: [8 Real-World Query Anti-Patterns (and How to Fix Them)](https://www.youtube.com/live/jlR6KFuFODI?si=PSCUNSrqo0-fVDJw)
Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/modeling/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ EF supports many different types of relationships, with many different ways thes
- [_One-to-one relationships_](xref:core/modeling/relationships/one-to-one), in which a single entity is associated with another single entity.
- [_Many-to-many relationships_](xref:core/modeling/relationships/many-to-many), in which any number of entities are associated with any number of other entities.

If you are new to EF, then trying the examples linked in in the bullet points above is a good way to get a feel for how relationships work.
If you are new to EF, then trying the examples linked in the bullet points above is a good way to get a feel for how relationships work.

To dig deeper into the properties of entity types involved in relationship mapping, see:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For information on how to use in-memory for testing, see the [see this section](

This approach typically uses a mock framework to create a test double of `DbContext` and `DbSet`, and tests against those doubles. Mocking `DbContext` can be a good approach for testing various *non-query* functionality, such as calls to <xref:Microsoft.EntityFrameworkCore.DbContext.Add*> or <xref:Microsoft.EntityFrameworkCore.DbContext.SaveChanges>, allowing you to verify that your code called them in write scenarios.

However, properly mocking `DbSet` *query* functionality is not possible, since queries are expressed via LINQ operators, which are static extension method calls over `IQueryable`. As a result, when some people talk about "mocking `DbSet`", what they really mean is that they create a `DbSet` backed by an in-memory collection, and then evaluate query operators against that collection in memory, just like a simple `IEnumerable`. Rather than a mock, this is actually a sort of fake, where the in-memory collection replaces the the real database.
However, properly mocking `DbSet` *query* functionality is not possible, since queries are expressed via LINQ operators, which are static extension method calls over `IQueryable`. As a result, when some people talk about "mocking `DbSet`", what they really mean is that they create a `DbSet` backed by an in-memory collection, and then evaluate query operators against that collection in memory, just like a simple `IEnumerable`. Rather than a mock, this is actually a sort of fake, where the in-memory collection replaces the real database.

Since only the `DbSet` itself is faked and the query is evaluated in-memory, this approach ends up being very similar to using the EF Core in-memory provider: both techniques execute query operators in .NET over an in-memory collection. As a result, this technique suffers from the same drawbacks as well: queries will behave differently (e.g. around case sensitivity) or will simply fail (e.g. because of provider-specific methods), raw SQL won't work and transactions will be ignored at best. As a result, this technique should generally be avoided for testing any query code.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ Starting with Microsoft.Data.Sqlite 10.0, when using `GetDateTimeOffset` on a te

##### Why

Is is to align with SQLite's behavior where timestamps without an offset are treated as UTC.
This is to align with SQLite's behavior where timestamps without an offset are treated as UTC.

##### Mitigations

Expand Down
4 changes: 2 additions & 2 deletions entity-framework/core/what-is-new/ef-core-6.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ After these improvements, the gap between the popular "micro-ORM" [Dapper](https
EF Core 6.0 contains many improvements to the Azure Cosmos DB database provider.

> [!TIP]
> You can run and debug into all the the Cosmos-specific samples by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/NewInEFCore6.Cosmos).
> You can run and debug into all the Cosmos-specific samples by [downloading the sample code from GitHub](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/NewInEFCore6.Cosmos).

### Default to implicit ownership

Expand Down Expand Up @@ -2537,7 +2537,7 @@ For this reason, EF Core 6.0 will now warn you when saving an optional dependent
> warn: 9/27/2021 09:25:01.338 RelationalEventId.OptionalDependentWithAllNullPropertiesWarning[20704] (Microsoft.EntityFrameworkCore.Update)
> The entity of type 'Address' with primary key values {CustomerId: -2147482646} is an optional dependent using table sharing. The entity does not have any property with a non-default value to identify whether the entity exists. This means that when it is queried no object instance will be created instead of an instance with all properties set to default values. Any nested dependents will also be lost. Either don't save any instance with only default values or mark the incoming navigation as required in the model.

This becomes even more tricky where the optional dependent itself acts a a principal for a further optional dependent, also mapped to the same table. Rather than just warning, EF Core 6.0 disallows just cases of nested optional dependents. For example, consider the following model, where `ContactInfo` is owned by `Customer` and `Address` is in turned owned by `ContactInfo`:
This becomes even more tricky where the optional dependent itself acts as a principal for a further optional dependent, also mapped to the same table. Rather than just warning, EF Core 6.0 disallows just cases of nested optional dependents. For example, consider the following model, where `ContactInfo` is owned by `Customer` and `Address` is in turned owned by `ContactInfo`:

<!--
public class Customer
Expand Down
2 changes: 1 addition & 1 deletion entity-framework/core/what-is-new/ef-core-7.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ For example, looking at the logging for the following call to `SaveChanges`:
-->
[!code-csharp[SimpleInsert](../../../../samples/core/Miscellaneous/NewInEFCore7/SaveChangesPerformanceSample.cs?name=SimpleInsert)]

Shows that in EF Core 6.0, the `INSERT` command is wrapped by commands to begin and and then commit a transaction:
Shows that in EF Core 6.0, the `INSERT` command is wrapped by commands to begin and then commit a transaction:

```output
dbug: 9/29/2022 11:43:09.196 RelationalEventId.TransactionStarted[20200] (Microsoft.EntityFrameworkCore.Database.Transaction)
Expand Down
4 changes: 2 additions & 2 deletions entity-framework/core/what-is-new/ef-core-8.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ WHERE EXISTS (
WHERE [b].[value] = @__beer_0)
```

`OpenJson` is now used to to extract values from JSON column so that each value can be matched to the passed parameter.
`OpenJson` is now used to extract values from JSON column so that each value can be matched to the passed parameter.

We can combine the use of `OpenJson` on the parameter with `OpenJson` on the column. For example, to find pubs that stock any one of a variety of lagers:

Expand Down Expand Up @@ -1242,7 +1242,7 @@ EF7 introduced support for mapping to JSON columns when using Azure SQL/SQL Serv
The existing [documentation from What's New in EF7](xref:core/what-is-new/ef-core-7.0/whatsnew#json-columns) provides detailed information on JSON mapping, queries, and updates. This documentation now also applies to SQLite.

> [!TIP]
> The code shown in the EF7 documentation has been updated to also run on SQLite can can be found in [JsonColumnsSample.cs](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/NewInEFCore8/JsonColumnsSample.cs).
> The code shown in the EF7 documentation has been updated to also run on SQLite and can be found in [JsonColumnsSample.cs](https://github.com/dotnet/EntityFramework.Docs/tree/main/samples/core/Miscellaneous/NewInEFCore8/JsonColumnsSample.cs).

#### Queries into JSON columns

Expand Down
6 changes: 3 additions & 3 deletions entity-framework/core/what-is-new/ef-core-9.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The logs show the following for this query:
Executed ReadItem (73 ms, 1 RU) ActivityId='13f0f8b8-d481-47f0-bf41-67f7deb008b2', Container='test', Id='8', Partition='["someValue"]'
```

Here, no SQL query is sent at all. Instead, the provider performs an an extremely efficient _point read_ (`ReadItem` API), which directly fetches the document given the partition key and ID. This is the most efficient and cost-effective kind of read you can perform in Azure Cosmos DB; [see the Azure Cosmos DB documentation](/azure/cosmos-db/nosql/how-to-dotnet-read-item) for more information about point reads.
Here, no SQL query is sent at all. Instead, the provider performs an extremely efficient _point read_ (`ReadItem` API), which directly fetches the document given the partition key and ID. This is the most efficient and cost-effective kind of read you can perform in Azure Cosmos DB; [see the Azure Cosmos DB documentation](/azure/cosmos-db/nosql/how-to-dotnet-read-item) for more information about point reads.

To learn more about querying with partition keys and point reads, [see the querying documentation page](xref:core/providers/cosmos/querying).

Expand Down Expand Up @@ -145,7 +145,7 @@ For more information, see the documentation on [querying with partition keys](xr

### Significantly improved LINQ querying capabilities

In EF 9.0, the LINQ translation capabilities of the the Azure Cosmos DB provider have been greatly expanded, and the provider can now execute significantly more query types. The full list of query improvements is too long to list, but here are the main highlights:
In EF 9.0, the LINQ translation capabilities of the Azure Cosmos DB provider have been greatly expanded, and the provider can now execute significantly more query types. The full list of query improvements is too long to list, but here are the main highlights:

* Full support for EF's primitive collections, allowing you to perform LINQ querying on collections of e.g. ints or strings. See [What's new in EF8: primitive collections](xref:core/what-is-new/ef-core-8.0/whatsnew#primitive-collections) for more information.
* Support for arbitrary querying over non-primitive collections.
Expand Down Expand Up @@ -173,7 +173,7 @@ First, previous versions of EF inserted the discriminator value into the JSON `i
}
```

This was done in order to allow for documents of different types (e.g. Blog and Post) and the same key value (1099) to exist within the same container partition. Starting with EF 9.0, the `id` property contains contains only the key value:
This was done in order to allow for documents of different types (e.g. Blog and Post) and the same key value (1099) to exist within the same container partition. Starting with EF 9.0, the `id` property contains only the key value:

```json
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public partial class UniversityContext : DbContext

Open the Program.cs file where the Main method is defined. Add the following code into the Main function.

The code adds two new University objects to the context. Spatial properties are initialized by using the DbGeography.FromText method. The geography point represented as WellKnownText is passed to the method. The code then saves the data. Then, the LINQ query that that returns a University object where its location is closest to the specified location, is constructed and executed.
The code adds two new University objects to the context. Spatial properties are initialized by using the DbGeography.FromText method. The geography point represented as WellKnownText is passed to the method. The code then saves the data. Then, the LINQ query that returns a University object where its location is closest to the specified location, is constructed and executed.

``` csharp
using (var context = new UniversityContext ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ The following table describes the attributes that can be applied to the **Collec

### Example

The following example shows a model-defined function that that uses a **CollectionType** element to specify that the function returns a collection of **Person** entity types (as specified with the **ElementType** attribute).
The following example shows a model-defined function that uses a **CollectionType** element to specify that the function returns a collection of **Person** entity types (as specified with the **ElementType** attribute).

``` xml
<Function Name="LastNamesAfter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Now we can generate a database that is based on the model.

Open the Program.cs file where the Main method is defined. Add the following code into the Main function.

The code adds two new University objects to the context. Spatial properties are initialized by using the DbGeography.FromText method. The geography point represented as WellKnownText is passed to the method. The code then saves the data. Then, the LINQ query that that returns a University object where its location is closest to the specified location, is constructed and executed.
The code adds two new University objects to the context. Spatial properties are initialized by using the DbGeography.FromText method. The geography point represented as WellKnownText is passed to the method. The code then saves the data. Then, the LINQ query that returns a University object where its location is closest to the specified location, is constructed and executed.

``` csharp
using (var context = new UniversityModelContainer())
Expand Down
Loading