public void Handle(FieldsSaved e) { var item = ModuleConfig.FirstOrDefault(c => c.ModuleNo == e.ModuleNo); if (item == null) { throw new Exception("module not found"); } var action = item.Actions.FirstOrDefault(c => c.Name == e.ActionName); if (action == null) { throw new Exception("action not found"); } action.Fields = e.Fields.Select(c => c.Id) .ToList(); SaveModule(ModuleConfig); }
public void Apply(FieldsSaved e) { }