diff --git a/entity-framework/core/get-started/xamarin.md b/entity-framework/core/get-started/xamarin.md index 6ef503bf6b..102501f256 100644 --- a/entity-framework/core/get-started/xamarin.md +++ b/entity-framework/core/get-started/xamarin.md @@ -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 @@ -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/) @@ -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. @@ -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(); @@ -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 @@ -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()) @@ -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, @@ -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);