C#C
C#3y ago
florent

❔ Source generator for creating REST Api

I want to create a REST endpoint for my entity classes.

Structure:
Backend.Api (contains asp net core logic, endpoints etc.)
Backend.Database (DB-Layer using EF Core, Entity classes)

Now I want to annotate my entity classes with a specific annotation (lets say [HasEndpoint]) and create the specific endpoint in the Backend.Api project. But the source generator will create the endpoints in the Backend.Database project.. How would it be possible to create the endpoints in Backend.Api using the entities in Backend.Database ?
Was this page helpful?