Skip to content

Commit 8351ff6

Browse files
Merge pull request #3771 from MicrosoftDocs/alvinashcraft-main-consolidate-dataaccess
Consolidate data access topics for UWP and WASDK
2 parents a4c4ee1 + 289634c commit 8351ff6

File tree

9 files changed

+29
-106
lines changed

9 files changed

+29
-106
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7579,6 +7579,16 @@
75797579
"source_path": "hub/apps/publish/update-your-app.md",
75807580
"redirect_url": "/windows/apps/publish/publish-your-app/publish-update-to-your-app-on-store?pivots=store-installer-msi-exe",
75817581
"redirect_document_id": false
7582+
},
7583+
{
7584+
"source_path": "uwp/data-access/mysql-databases.md",
7585+
"redirect_url": "/windows/apps/develop/data-access/mysql-database",
7586+
"redirect_document_id": false
7587+
},
7588+
{
7589+
"source_path": "uwp/data-access/mongo-db-databases.md",
7590+
"redirect_url": "/windows/apps/develop/data-access/mongodb-database",
7591+
"redirect_document_id": false
75827592
}
75837593
]
75847594
}

hub/apps/develop/data-access/cosmos-db-data-access.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
title: Use a Cosmos DB database from a Windows app
3-
description: Learn how to connect your Windows App SDK app to a Cosmos DB database and test the connection programmatically.
4-
ms.date: 12/06/2022
3+
description: Learn how to connect your Windows app to a Cosmos DB database and test the connection programmatically.
4+
ms.date: 09/14/2023
55
ms.topic: article
6-
keywords: windows 10, windows 11, windows app sdk, Cosmos DB, azure, cloud, nosql, database
6+
keywords: windows, windows app sdk, Cosmos DB, azure, cloud, nosql, database, wpf, uwp, winforms, windows forms, winui
77
ms.localizationpriority: medium
88
---
99

1010
# Use a Cosmos DB database from a Windows app
1111

12-
This article contains the steps required to enable working with a Cosmos DB database from a Windows App SDK app. It also contains a small code snippet showing how you can interact with the database in code.
12+
This article contains the steps required to enable working with a Cosmos DB database from a Windows app. It also contains a small code snippet showing how you can interact with the database in code.
1313

1414
## Set up your solution
1515

16-
To connect your app directly to a Cosmos DB database, your WinUI app can target any minimum version of Windows supported by Windows App SDK. Follow these steps to install the package and try out example code for some basic tasks.
16+
This example can be used with any WPF, Windows Forms, WinUI 3, and UWP project to connect your Windows app to a Cosmos DB database. Follow these steps to install the package and try out example code for some basic tasks.
1717

1818
Open the **Package Manager Console** (View -> Other Windows -> Package Manager Console). Use the command `Install-Package Microsoft.Azure.Cosmos` to install the NuGet package for the **Azure Cosmos DB for NoSQL client library for .NET**. This will allow you to programmatically access Cosmos DB databases.
1919

hub/apps/develop/data-access/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
ms.assetid: dc686801-edd0-44b1-afb9-20486fd9c34e
33
title: Data access in Windows apps
4-
description: Learn how to store data on the device in a private database and use object relational mapping in Windows App SDK apps.
4+
description: Learn how to store data on the device in a private database and use object relational mapping in Windows apps.
55
ms.date: 12/06/2022
66
ms.topic: article
77
keywords: windows 10, windows 11, windows app sdk, data, database, relational, tables, sqlite, cosmosdb, mysql
@@ -17,7 +17,7 @@ You can store data on the user's device by using a SQLite database. You can also
1717
| [Use a SQLite database on Windows](sqlite-data-access.md) | Shows you how to use SQLite to store and retrieve data in a light-weight database on the user's device. SQLite is a server-less, embedded database engine. |
1818
| [Use a SQL Server database in a Windows app](sql-server-database.md) | Shows you how to connect directly to a SQL Server database and then store and retrieve data by using classes in the [System.Data.SqlClient](/dotnet/api/system.data.sqlclient) namespace. No service layer required. |
1919
| [Use a Cosmos DB database in a Windows app](cosmos-db-data-access.md) | Shows you how to work with a [Cosmos DB](/azure/cosmos-db/introduction) database and and test the connection programmatically. Cosmos DB is a cloud-based document database. |
20-
| [Use a MySQL database in a Windows app](mysql-database.md) | Shows you how to connect to a MySQL database and interact with the database in a Windows App SDK application. MySQL is an open source, cross-platform relational database. |
20+
| [Use a MySQL database in a Windows app](mysql-database.md) | Shows you how to connect to a MySQL database and interact with the database in a Windows application. MySQL is an open source, cross-platform relational database. |
2121
| [Use a MongoDB database in a Windows app](mongodb-database.md) | Shows you how to work with a MongoDB database and and test the connection programmatically. MongoDB is a cross-platform document database. |
2222

2323
## Related topics

hub/apps/develop/data-access/mongodb-database.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
title: Use a MongoDB database in a Windows app
3-
description: Learn how to connect your Windows App SDK app directly to a MongoDB database and test the connection programmatically.
3+
description: Learn how to connect your Windows app directly to a MongoDB database and test the connection programmatically.
44
ms.date: 12/08/2022
55
ms.topic: article
6-
keywords: windows 10, windows 11, windows app sdk, MongoDB, database
6+
keywords: windows, windows app sdk, mongodb, nosql, database, uwp, wpf, winforms, windows forms, winui
77
ms.localizationpriority: medium
88
---
99

1010
# Use a MongoDB database in a Windows app
1111

12-
This article contains the steps required to enable working with a MongoDB database from a Windows App SDK app. It also contains a small code snippet showing how you can interact with the database in code.
12+
This article contains the steps required to enable working with a MongoDB database from a Windows app. It also contains a small code snippet showing how you can interact with the database in code.
1313

1414
## Set up your solution
1515

16-
To connect your app directly to a MongoDB database, your WinUI app can target any minimum version of Windows supported by Windows App SDK. Follow these steps to install the package and try out the example code to read data from an existing MongoDB database.
16+
This example can be used with any WPF, Windows Forms, WinUI 3, and UWP project to connect your Windows app to MongoDB. Follow these steps to install the package and try out the example code to read data from an existing MongoDB database.
1717

1818
Open the **Package Manager Console** (View -> Other Windows -> Package Manager Console). Use the command `Install-Package MongoDB.Driver` to install the NuGet package for the official driver for MongoDB. This will allow you to programmatically access MongoDB databases.
1919

hub/apps/develop/data-access/mysql-database.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
title: Use a MySQL database in a Windows app
3-
description: Learn how to connect to a MySQL database from your Windows App SDK app, and test your connection using sample code.
3+
description: Learn how to connect to a MySQL database from your Windows app, and test your connection using sample code.
44
ms.date: 12/06/2022
55
ms.topic: article
6-
keywords: windows 10, windows 11, windows app sdk, MySQL, database
6+
keywords: windows, windows app sdk, MySQL, database, uwp, wpf, winforms, windows forms, winui
77
ms.localizationpriority: medium
88
---
99

1010
# Use a MySQL database in a Windows app
1111

12-
This article contains the steps required to enable working with a MySQL database from a Widows App SDK app. It also contains a small code snippet showing how you can interact with the database in code.
12+
This article contains the steps required to enable working with a MySQL database from a Widows app. It also contains a small code snippet showing how you can interact with the database in code.
1313

1414
## Set up your solution
1515

16-
To connect your app directly to a MySQL database, your WinUI app can target any minimum version of Windows supported by Windows App SDK. Follow these steps to install the package and try out the example code to read data from an existing MySQL database.
16+
This example can be used with any WPF, Windows Forms, WinUI 3, and UWP project to connect your Windows app to a MySQL database. Follow these steps to install the package and try out the example code to read data from an existing MySQL database.
1717

1818
Open the **Package Manager Console** (View -> Other Windows -> Package Manager Console). Use the command `Install-Package MySql.Data` to install the NuGet package for the MySQL core class library. This will allow you to programmatically access MySQL databases.
1919

uwp/data-access/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ms.assetid: 76776b0f-3163-48c9-835b-3f4213968079
33
title: Data access
44
description: This section discusses storing data on the device in a private database and using object relational mapping in Universal Windows Platform (UWP) apps.
5-
ms.date: 10/03/2022
5+
ms.date: 09/14/2023
66
ms.topic: article
77
keywords: windows 10, windows 11, uwp, data, database, relational, tables, sqlite, mongodb, mysql
88
ms.localizationpriority: medium
@@ -16,8 +16,9 @@ You can store data on the user's device by using a SQLite database. You can also
1616
|-------|------------|
1717
| [Use a SQLite database in a UWP app](sqlite-databases.md) | Shows you how to use SQLite to store and retrieve data in a light-weight database on the users device. SQLite is a server-less, embedded database engine. |
1818
| [Use a SQL server database in a UWP app](sql-server-databases.md) | Shows you how to connect directly to a SQL Server database and then store and retrieve data by using classes in the [System.Data.SqlClient](/dotnet/api/system.data.sqlclient) namespace. No service layer required. |
19-
| [Use a MongoDB database in a UWP app](mongo-db-databases.md) | Shows you how to work with a MongoDB database and and test the connection programmatically. MongoDB is a cross-platform document database. |
20-
| [Use a MySQL database in a UWP app](mysql-databases.md) | Shows you how to connect to a MySQL database and interact with the database in a UWP application. MySQL is an open source, cross-platform relational database. |
19+
| [Use a MongoDB database in a Windows app](/windows/apps/develop/data-access/mongodb-database) | Shows you how to work with a MongoDB database and and test the connection programmatically. MongoDB is a cross-platform document database. |
20+
| [Use a MySQL database in a Windows app](/windows/apps/develop/data-access/mysql-database) | Shows you how to connect to a MySQL database and interact with the database in a Windows application. MySQL is an open source, cross-platform relational database. |
21+
| [Use a Cosmos DB database in a Windows app](/windows/apps/develop/data-access/cosmos-db-data-access) | Shows you how to work with a [Cosmos DB](/azure/cosmos-db/introduction) database and and test the connection programmatically. Cosmos DB is a cloud-based document database. |
2122

2223
## Related topics
2324

uwp/data-access/mongo-db-databases.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

uwp/data-access/mysql-databases.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

uwp/develop/toc.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,6 @@
234234
href: ../data-access/sqlite-databases.md
235235
- name: Use a SQL Server database
236236
href: ../data-access/sql-server-databases.md
237-
- name: Use a MongoDB database
238-
href: ../data-access/mongo-db-databases.md
239-
- name: Use a MySQL database
240-
href: ../data-access/mysql-databases.md
241237
- name: Data binding
242238
href: ../data-binding/index.md
243239
items:

0 commit comments

Comments
 (0)