Exemple #1
0
        public async Task <IActionResult> Delete(IFormCollection collection)
        {
            List <int> fundIds = new List <int>();

            foreach (var key in collection.Keys)
            {
                if (key.Contains("checkbox_fund"))
                {
                    fundIds.Add(int.Parse(key.Replace("checkbox_fund", "")));
                }
            }

            await _fundService.DeleteFunds(fundIds.ToArray());

            return(RedirectToAction("List"));
        }