C
C#14mo ago
SwaggerLife

✅ Only add certain controllers?

Is there a way I can only add/map certain controllers based on if the application is in development or production? I was thinking of using some sort of attribute but don't know how?
2 Replies
cap5lut
cap5lut14mo ago
u can use precompiler directives for this
#if DEBUG
// stuff that should only be in debug mode
#endif
#if DEBUG
// stuff that should only be in debug mode
#endif
SwaggerLife
SwaggerLife14mo ago
@cap5lut Thanks mate