public async Task <IActionResult> CreateCategory(Categoryes categoryes) { await _context.Category.AddAsync(categoryes); await _context.SaveChangesAsync(); return(RedirectToAction("Norms")); }
private void SelectCategory(object sender, EventArgs args, string category) { if (Categoryes.Any(o => o == category)) { Categoryes.Remove(category); } else { Categoryes.Add(category); } }