© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
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]
[HasEndpoint]
) and create the specific endpoint in the
Backend.Api
Backend.Api
project. But the source generator will create the endpoints in the
Backend.Database
Backend.Database
project.. How would it be possible to create the endpoints in
Backend.Api
Backend.Api
using the entities in
Backend.Database
Backend.Database
?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

source generator
C#CC# / help
3y ago
Creating and using an incremental source generator
C#CC# / help
4y ago
Source Generator For NuGet References
C#CC# / help
4y ago
❔ Source generator & protobuf
C#CC# / help
4y ago