Program.cs -

: For larger apps, extract logic into extension methods to keep the file clean. Group configurations by feature (e.g., Database, Identity, Swagger).

: Wrap your code in a namespace and a class Program to ensure proper scope. Program.cs

: Start with necessary using directives (e.g., using System; ). : For larger apps, extract logic into extension