public async Task <IActionResult> OnGetAsync(int?idSocio, int?idRimborso)
        {
            _logger.LogInformation("OnGetAsync: idSocio = {0}, idRimborso ={1}", idSocio, idRimborso);
            var ana = await _context.GetAnagrafica();

            AttachExcelExportAction(_env, ana);
            if (idSocio == null && idRimborso == null)
            {
                _logger.LogInformation("params null, return NOT FOUND");
                return(NotFound());
            }

            try
            {
                if (idRimborso != null)
                {
                    await GetExisting(idRimborso.Value, _context);
                }
                else if (idSocio != null)
                {
                    await GetNew(idSocio.Value);
                }
            }
            catch (KeyNotFoundException)
            {
                return(NotFound());
            }


            return(Page());
        }
        public async Task OnGetAsync()
        {
            Anagrafica = await _context.GetAnagrafica();

            if (Anagrafica == null)
            {
                Anagrafica = new AnagraficaFilarmonica();
            }
            if (HybridSupport.IsElectronActive)
            {
                Electron.IpcMain.RemoveAllListeners("export-excel");
                Electron.IpcMain.On("export-excel", async(args) => await ExportExcelAction(args));
            }
        }
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            var ana = await _context.GetAnagrafica();

            AttachExcelExportAction(_env, ana);

            if (id == null)
            {
                return(NotFound());
            }

            await GetExisting(id.Value, _context);

            return(Page());
        }