4

Authorize EF Core CRUD Operations and Download Reports in Blazor WebAssembly wit...

 1 year ago
source link: https://community.devexpress.com/blogs/news/archive/2023/05/01/authorize-ef-core-crud-operations-and-download-reports-in-blazor-webassembly-with-odata-web-api.aspx
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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 Example Overview

Today we published a new GitHub example: How to Create a Web API Service Backend for a .NET MAUI Application. In this example, we implemented a full client-side Blazor WebAssembly 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.

BlazorWasm(2).png

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).

BlazorWasmReport(2).png

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.

1. Have you used our Web API Service in the past? *

Yes

No

Your experience with it (if any):

2. Are you planning to use our Web API Service for future projects? *

Yes

No

Please elaborate on your reasons: what you like and what you don't, which alternative solutions you already use, what's your experience with them, etc.

3. In addition to basic CRUD and Authorization, which of the following scenarios are of most value to you for API services and why?

Log history of data changes in databases using service endpoints (aka Audit Trail)

Download PDF from report templates and filtered data in databases using service endpoints (aka Reports)

gRPC

Optimistic Locking (aka ETag Support)

Download BLOB data stored in databases using service endpoints (aka File Attachments)

Auto-generate endpoints from methods in business classes (aka XAF's ActionAttribute Support)

GraphQL

Built-in endpoints to check security permissions (aka XAF's IsGrantedExtensions.CanRead/CanCreated/CanDelete)

OData Batch Processing (aka Batch Update)

Obtain localized captions for classes, members, and custom UI elements stored in databases using service endpoints (aka Localization)

Insert/update operations for nested business class properties via OData query options

Check state of input data with complex validtion rules using service endpoints (aka Validation)

API Versioning

Please describe your project requirements in greater detail to shape future Web API Service development

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.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK