Skip to content
| Marketplace
Sign in
Visual Studio>Tools>FastEndpoints

FastEndpoints

Dĵ ΝιΓΞΗΛψΚ

|
520 installs
| (0) | Free
Adds a `new item` template to Visual Studio `new file` dialog as well as some useful code snippets for easily adding new vertical slice feature file sets and quickly scaffolding different classes for rapid endpoint creation with FastEndpoints.

VS Code Snippets

The FastEndpoints VS Extension adds the following handy code snippet shortcuts to make it faster to scaffold/expand new classes in your project:

epreq

Scaffolds an endpoint with only a request dto

public class Endpoint : Endpoint<Request>

epreqres

Scaffolds an endpoint with request and response dtos

public class Endpoint : Endpoint<Request, Response>

epnoreq

Scaffolds an endpoint without a request nor response dto

public class Endpoint : EndpointWithoutRequest

epres

Scaffolds an endpoint without a request dto but with a response dto

public class Endpoint : EndpointWithoutRequest<Response>

epdto

Scaffolds the request & response dtos for an endpoint

public class Request {}
public class Response {}

epval

Scaffolds an endpoint validator for a given request dto

public class Validator : Validator<Request>

epmap

Scaffolds an endpoint mapper class for the given request, response and entity dtos

public class Mapper : Mapper<Request, Response, Entity>

epsum

Scaffolds a summary class for a given endpoint and request dto

public class Summary : Summary<Endpoint, Request>

epdat

Scaffolds a static data class for an endpoint

public static class Data

epfull

Scaffolds the complete set of classes for a full vertical slice

VS New Item Template

If you're doing vertical slice architecture and placing each individual feature in their own namespace, you can take advantage of the new item template added to the "add new file" dialog of visual studio to make it convenient to add feature file sets to your project.

Once installed, your visual studio add new item dialog will have FastEndpoints Feature File Set listed under Installed > Visual C# node. Then, instead of entering a file name, simply enter the namespace you want your new feature to be added to followed by .cs

A new feature file set will be created in the folder you selected.

There will be 4 new files created under the namespace you chose.

  • Data.cs - Use this class to place all of your data access logic.

  • Models.cs - Place your request, response DTOs and the validator in this file.

  • Mapper.cs - Domain entity mapping logic will live here.

  • Endpoint.cs - This will be your new endpoint definition.

Click here for an example feature file set.

VS Extension
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft