Rystem.RepositoryFramework allows you to use correctly concepts like repository pattern, CQRS and DDD. You have interfaces for your domains, auto-generated api, auto-generated HttpClient to simplify connection "api to front-end", a functionality for auto-population in memory of your models, a functionality to simulate exceptions and waiting time from external sources to improve your implementation/business test and load test.
$ dotnet add package Rystem.RepositoryFramework.Web.ComponentsYou have to add a service for UI
builder.Services
.AddRepositoryUI();
and add the endpoint for your repository
app
.AddDefaultRepositoryEndpoints();
In the Host.cshtml you have to add style, javascript files and the RepositoryApp.
<html>
<head>
<!-- inside of head section -->
<partial name="RepositoryStyle" />
</head>
<body>
<component type="typeof(RepositoryApp<App>)" render-mode="ServerPrerendered" />
<!-- inside of body section and after the div/app tag -->
<partial name="RepositoryScript" />
</body>
</html>
Instead of "App" class you can use every class in your DLL, but remember the class needs to be inside your blazor/razor application.
In the Host.cshtml you have to add style, javascript files and the RepositoryAuthenticatedApp.
<html>
<head>
<!-- inside of head section -->
<partial name="RepositoryStyle" />
</head>
<body>
<component type="typeof(RepositoryAuthenticatedApp<App>)" render-mode="ServerPrerendered" />
<!-- inside of body section and after the div/app tag -->
<partial name="RepositoryScript" />
</body>
</html>
Instead of "App" class you can use every class in your DLL, but remember the class needs to be inside your blazor/razor application.
In the Host.cshtml you have to add style, javascript files
<html>
<head>
<!-- inside of head section -->
<partial name="RepositoryStyle" />
</head>
<body>
<component type="typeof(App)" render-mode="ServerPrerendered" />
<!-- inside of body section and after the div/app tag -->
<partial name="RepositoryScript" />
</body>
</html>
In your app you can use
| Component | Usage |
|---|---|
| RepositoryManager | A component to manage your repository in one page |