public PartialViewResult Rules(int categoryId)
{
var rulesforevent = repository.GetRulesForCategory(categoryId);
var available = repository.AvailableRules.ToList();
available.RemoveAll(x => rulesforevent.Exists(y => y.Rule.RuleId == x.RuleId));
var model = new RulesViewModel
{
AvailableRules = available,
RulesForEvent = rulesforevent,
CategoryId = categoryId
};
return PartialView("_Rules", model);
}