Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f297f9e

Browse files
committedDec 10, 2021
fixup! Update platforms page for 6.0
Sorry, got a bit overzealous
1 parent 043024b commit f297f9e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed
 

‎entity-framework/core/miscellaneous/connection-strings.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Connection Strings - EF Core
33
description: Managing connection strings under different environments with Entity Framework Core
44
author: bricelam
5-
ms.date: 12/10/2021
5+
ms.date: 10/27/2016
66
uid: core/miscellaneous/connection-strings
77
---
88
# Connection Strings
@@ -72,3 +72,20 @@ public class BloggingContext : DbContext
7272
}
7373
}
7474
```
75+
76+
## Universal Windows Platform (UWP)
77+
78+
Connection strings in a UWP application are typically a SQLite connection that just specifies a local filename. They typically do not contain sensitive information, and do not need to be changed as an application is deployed. As such, these connection strings are usually fine to be left in code, as shown below. If you wish to move them out of code then UWP supports the concept of settings, see the [App Settings section of the UWP documentation](/windows/uwp/app-settings/store-and-retrieve-app-data) for details.
79+
80+
```csharp
81+
public class BloggingContext : DbContext
82+
{
83+
public DbSet<Blog> Blogs { get; set; }
84+
public DbSet<Post> Posts { get; set; }
85+
86+
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
87+
{
88+
optionsBuilder.UseSqlite("Data Source=blogging.db");
89+
}
90+
}
91+
```

0 commit comments

Comments
 (0)
Please sign in to comment.