Skip to content
Search lessons, topics, tests…
Esc

    ↑ ↓ moveEnter openEsc close

    Guided course · AI and Career Skills for .NET Developers

    Prompt Engineering for .NET Developers: back to the course

    Module 1 · Prompting Foundations · Lesson 2 of 26

    The Developer Prompt Formula

    For software work, vague prompts produce generic answers because the model has to guess your framework version, architecture, database, coding standards, and hidden constraints. The fix is to provide the smallest useful amount of real context.

    Prompt partWhat to include.NET example
    RoleTell the model what engineering lens to use.Act as a senior ASP.NET Core backend engineer and code reviewer.
    TaskDescribe what you want built, fixed, reviewed, or explained.Create POST /api/orders with validation and EF Core persistence.
    StackGive app type, .NET version, database, ORM, testing tools..NET 9 Web API, EF Core, SQL Server, xUnit, FluentAssertions.
    ArchitectureState the current project style.Clean Architecture: Api, Application, Domain, Infrastructure.
    Relevant codePaste only the code that matters.Controller, service method, DbContext, entity, error stack trace.
    ConstraintsMake hidden rules explicit.No extra packages, async I/O, no entity exposure, preserve response shape.
    Sign in to mark lessons done and keep your place in the course.Sign in