Skip to content

Instantly share code, notes, and snippets.

@samonzeweb
Created March 27, 2018 13:55
Show Gist options
  • Save samonzeweb/40b1a5ecfecf073421974c5848032ca6 to your computer and use it in GitHub Desktop.
Save samonzeweb/40b1a5ecfecf073421974c5848032ca6 to your computer and use it in GitHub Desktop.
VS Code snippets for APS.NET Core
{
"ASP.NET Core MVC Controller": {
"prefix": "controller",
"description": "A minimal ASP.NET Core MVC controller.",
"body": [
"using System;",
"using System.Collections.Generic;",
"using System.Linq;",
"using System.Threading.Tasks;",
"using Microsoft.AspNetCore.Mvc;",
"",
"namespace ${1:MyProject.Controllers}",
"{",
"\tpublic class ${2:MyController} : ${3:Controller}",
"\t{",
"\t\tpublic ${2:MyController}() {",
"\t\t",
"\t\t}",
"\t\t[HttpGet]",
"\t\tpublic async Task<IActionResult> Index()",
"\t\t{",
"\t\t\t$4throw new NotImplementedException();",
"\t\t}",
"\t}",
"}",
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment