Book Image

Apps and Services with .NET 7

By : Mark J. Price
Book Image

Apps and Services with .NET 7

By: Mark J. Price

Overview of this book

Apps and Services with .NET 7 is for .NET 6 and .NET 7 developers who want to kick their C# and .NET understanding up a gear by learning the practical skills and knowledge they need to build real-world applications and services. It covers specialized libraries that will help you monitor and improve performance, secure your data and applications, and internationalize your code and apps. With chapters that put a variety of technologies into practice, including Web API, OData, gRPC, GraphQL, SignalR, and Azure Functions, this book will give you a broader scope of knowledge than other books that often focus on only a handful of .NET technologies. It covers the latest developments, libraries, and technologies that will help keep you up to date. You’ll also leverage .NET MAUI to develop mobile apps for iOS and Android as well as desktop apps for Windows and macOS.
Table of Contents (23 chapters)
22
Index

Manipulating data with Core (SQL) API

The most common API for working with data in Azure Cosmos DB is Core (SQL).

The full documentation for Core (SQL) API can be found at the following link: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/.

Performing CRUD operations with Cosmos SQL API

You can perform CRUD operations on JSON documents in Cosmos with SQL API by calling the following most common overloads of methods on an instance of the Microsoft.Azure.Cosmos.Container class:

  • ReadItemAsync<T>(id, partitionKey): Where T is the item type to get, id is its unique identifier, and partitionKey is its partition key value.
  • ReadManyItemsAsync<T>(idsAndPartitionKeys): Where T is the item type to get, and idsAndPartitionKeys are the unique identifiers and partition key values of a read-only list of items to retrieve.
  • CreateItemAsync(object): Where object is an instance of the item type to insert.
  • DeleteItemAsync<T&gt...