Skip to content

Instantly share code, notes, and snippets.

Created August 25, 2022 15:50
What would you like to do?
public class MyController : ControllerBase
// Both actions will bound the SomeCustomType from the DI container
public ActionResult GetWithAttribute([FromServices]SomeCustomType service) => Ok();
public ActionResult Get(SomeCustomType service) => Ok();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment