Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Create CRUD for Blazor using API

$
0
0

In Visual Studio, I can use scaffolded item to add CRUD for an entity using Entity Framework Core. So, I select Razor Component:

enter image description here

Then, I select the template, the model class and the DbContext class:

enter image description here

The generated code uses

@inject IDbContextFactory<HypnoPlatform.Persistence.HypnoContext> DbFactory 

but in the Blazor web application that is not permitted. So, I want to create the CRUD based the API that I can create using the same tool. I can't find an option to do it so. I don't want to change every page manually to replace the code from using the database to using APIs (also because I have 40 tables).


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>