A universal solution for editable copywriting in ASP.NET core
While RazorFields are under active development, the project is fully functional in it's present state (and being used in several apps of mine). Keep in mind that occassional issues may popup.
- simplify your template copywriting
- separate copywriting X templating layers
- store actual fields in persistent storage (EntityFramework, more comming soon...)
- generate API for editing whole system at runtime
- to be done, see
examples
folder (RazorFields.Demo
project)
-
register in services
services.AddRazorFields();
-
create public record of yours and tag it with a
[RazorModel]
attribute -
inject RazorFields service with DI
private readonly IRazorFieldsService _rfs;
-
query tagged razor models
var razorModel = _rfs.GetModel<HomeRazorModel>();
- add entity framework persistence
services.AddRazorFieldsEntityFramework<DatabaseContext>();
- create Rest API controller
public class RazorFieldsController : RazorFieldsControllerBase
{
public RazorFieldsController(IRazorFieldsService rfs) : base(rfs)
{
}
}
-
In-memory razor model caching
-
Attribute for injection
-
Extension loader
-
EntityFramework connector extension nuget
-
Rest API extension nuget
-
Versioned RazorModel (eg. abstract razor model template you can create versions of)
-
MongoDB connector extension
-
Redis connector extension
-
Admin UI extension
-
Custom distributed cache extension (memory cache, redis)
-
? Saga-based history extension
RazorFields project is licensed under the MIT License