Blazor WebAssembly — Authorize EF Core CRUD Operations and Download Reports with OData Web API

News
01 May 2023

In our previous post we announced a GitHub example that demonstrates how to develop a .NET MAUI mobile app with the DevExpress Web API Service alongside Entity Framework Core (EF Core) for the backend. This example follows a series of video tutorials dedicated to our 1-Click solution to build CRUD REST API for many popular usage scenarios (powered by the EF Core and XPO ORM).

Introduction to the DevExpress Web API Service

If you reviewed our .NET MAUI example, you know that you can use our Web API Service to create a secure multipurpose OData backend within minutes and you can consume this backend from virtually any frontend technology of your choice. The recent series of posts on how to consume the Web API from JavaScript with Svelte serves as another great example:

If you are not yet familiar with our Web API Service, please see the following posts to get started: Common Questions about the New DevExpress Web API Service (powered by Entity Framework and XPO ORM) | Introduction blog post

You can get your free copy of .NET App Security Library & Web API Service here: https://www.devexpress.com/security-api-free. To learn about the advanced/paid features of our Web API Service, please refer to the following help topic: Obtain a Report from a Web API Controller Endpoint.

Blazor WebAssembly/WASM Example Overview

Today we published a new GitHub example: How to Create a Web API Service Backend for a Blazor WebAssembly Application. In this example, we implemented a full client-side Blazor WebAssembly/WASM frontend (powered by our Blazor UI component suite). As with the .NET MAUI example, we used our free Web API Service on the backend to take advantage of its many features (auto-generated OData endpoints as well as custom endpoints, authentication and access permissions). We also configured both the backend and the frontend to make use of cookie-based authentication to protect user data.

Just like the .NET MAUI example, our Blazor WebAssembly example also demonstrates how to generate reports and serve them through an API endpoint (please note that the reporting platform is not free – you need to purchase the appropriate DevExpress Subscription to use these features).

To replicate our solution in your next Blazor WebAssembly project, please follow the step-by-step GitHub readme file and remember to:

  1. First ensure that your development environment is configured as described in the Prerequisites section of the readme file.
  2. Run the WebApi project and once it starts, launch the Blazor.WebAssembly application.

Your Feedback Matters!

Please take a moment to reply to the following questions – your feedback will help us shape/define future development strategies.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.