Skip to content

Commit

Permalink
fixing suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
codemillmatt committed Jul 10, 2020
1 parent 970dcb2 commit 2cc3005
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions entity-framework/core/get-started/xamarin.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Getting Started - EF Core
title: Getting Started with EF Core and Xamarin - EF Core
author: codemillmatt
ms.date: 07/07/2020
ms.author: masoucou
Expand All @@ -19,7 +19,7 @@ You can follow the tutorial by using Visual Studio on Windows or Visual Studio f

Install one of the below:

* [Visual Studio 2019 version 16.3 or later](https://www.visualstudio.com/downloads/) with this workload:
* [Visual Studio 2019 version 16.3 or later](https://www.visualstudio.com/downloads/) with this workload:
* **Mobile Development with .NET**
* [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/)

Expand Down Expand Up @@ -65,11 +65,11 @@ Go back to the blog list page. And click **Delete All** in the toolbar. All blog

The following sections will walk you through the code in the sample project that reads, creates, updates, and deletes data from a SQLite database using EF Core with Xamarin.Forms.

It is assumed that you are familiar with the Xamarin.Forms topics of displaying data and navigating between pages.
It is assumed that you are familiar with the Xamarin.Forms topics of [displaying data](/xamarin/xamarin-forms/app-fundamentals/data-binding/) and [navigating between pages](/xamarin/xamarin-forms/app-fundamentals/navigation/).

## Entity Framework Core NuGet packages

To create Xamarin.Forms apps with EF Core, you install the package for the EF Core database provider(s) you want to target into all of the projects in the Xamarin.Forms solution. This tutorial uses SQLite.
To create Xamarin.Forms apps with EF Core, you install the package for the EF Core database provider(s) you want to target into all of the projects in the Xamarin.Forms solution. This tutorial uses the SQLite provider.

The following NuGet package is needed in each of the projects in the Xamarin.Forms solution.

Expand Down Expand Up @@ -112,7 +112,7 @@ The following are some instances in the app where EF Core is used to access SQLi
* Return all records.
* The `OnAppearing` function of `BlogsPage.xaml.cs` returns all `Blog` records and stores them into a `List` variable.

```c-sharp
```csharp
using (var blogContext = new BloggingContext())
{
var theBlogs = blogContext.Blogs.ToList();
Expand All @@ -122,7 +122,7 @@ using (var blogContext = new BloggingContext())
* Return specific records.
* The `OnAppearing` function of `PostsPage.xaml.cs` returns `Post` records that contain a specific `BlogId`.

```c-sharp
```csharp
using (var blogContext = new BloggingContext())
{
var postList = blogContext.Posts
Expand All @@ -136,7 +136,7 @@ using (var blogContext = new BloggingContext())
* Insert a new record.
* The `Save_Clicked` function of `AddBlogPage.xaml.cs` inserts a new `Blog` object into the SQLite database.

```c-sharp
```csharp
var blog = new Blog { Url = blogUrl.Text };

using (var blogContext = new BloggingContext())
Expand All @@ -152,7 +152,7 @@ using (var blogContext = new BloggingContext())
* Update an existing record.
* The `Save_Clicked` function of `AddPostPage.xaml.cs` updates an existing `Blog` object with a new `Post`.

```c-sharp
```csharp
var newPost = new Post
{
BlogId = BlogId,
Expand All @@ -177,7 +177,7 @@ using (var blogContext = new BloggingContext())
* Delete all records with cascade to child records.
* The `DeleteAll_Clicked` function of `BlogsPage.xaml.cs` deletes all the `Blog` records in the SQLite database and cascades the deletes to all of the `Blog` child `Post` records.

```c-sharp
```csharp
using (var blogContext = new BloggingContext())
{
blogContext.RemoveRange(blogContext.Blogs);
Expand Down

0 comments on commit 2cc3005

Please sign in to comment.