Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mobile Development with .NET

You're reading from   Mobile Development with .NET Build cross-platform mobile applications with Xamarin.Forms 5 and ASP.NET Core 5

Arrow left icon
Product type Paperback
Published in Apr 2021
Publisher Packt
ISBN-13 9781800204690
Length 572 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Can Bilgin Can Bilgin
Author Profile Icon Can Bilgin
Can Bilgin
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Preface 1. Section 1: Understanding .NET
2. Chapter 1: Getting Started with .NET 5.0 FREE CHAPTER 3. Chapter 2: Defining Xamarin, Mono, and .NET Standard 4. Chapter 3: Developing with Universal Windows Platform 5. Section 2: Xamarin and Xamarin.Forms
6. Chapter 4: Developing Mobile Applications with Xamarin 7. Chapter 5: UI Development with Xamarin 8. Chapter 6: Customizing Xamarin.Forms 9. Section 3: Azure Cloud Services
10. Chapter 7: Azure Services for Mobile Applications 11. Chapter 8: Creating a Datastore with Cosmos DB 12. Chapter 9: Creating Microservices Azure App Services 13. Chapter 10: Using .NET Core for Azure Serverless 14. Section 4: Advanced Mobile Development
15. Chapter 11: Fluid Applications with Asynchronous Patterns 16. Chapter 12: Managing Application Data 17. Chapter 13: Engaging Users with Notifications and the Graph API 18. Section 5: Application Life Cycle Management
19. Chapter 14: Azure DevOps and Visual Studio App Center 20. Chapter 15: Application Telemetry with Application Insights 21. Chapter 16: Automated Testing 22. Chapter 17: Deploying Azure Modules 23. Chapter 18: CI/CD with Azure DevOps 24. Other Books You May Enjoy

Creating our first microservice

For our mobile application, in Chapter 8, Creating a Datastore with Cosmos DB, we created a simple data access proxy that retrieves data from Cosmos DB. In this exercise, we will be creating small web API components that will expose various methods for CRUD operations on our collections.

Initial setup

Let's begin our implementation:

  1. First, create an ASP.NET Core project:

    Figure 9.2 – Creating an ASP.NET Project

  2. Once the project is created, do a quick test to check whether the dotnet core components are properly set up.
  3. Open a console window and navigate to the project folder. The following commands will restore the referenced packages and compile the application:
    dotnet restore
    dotnet build
  4. Once the application is built, we can use the run command and execute a GET call to the api/values endpoint:

    Figure 9.3 – First Run for the ASP.NET Core App

    This should result in the output of the values from the WeatherForecastController...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime