Ejemplo n.º 1
0
        private IActionResult Render(GenerateProjectCommand cmd)
        {
            var model = new IndexModel
            {
                Now = DateTime.Now,
                Cmd = cmd,
            };

            return(View(model));
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> Index(GenerateProjectCommand cmd)
 {
     return(await ExecAsync(cmd,
                            success : bytes => File(bytes, "application/zip", $"{cmd.Name}.zip"),
                            failure : () => Render(cmd)));
 }