public StandardRules(int eventId) { this.eventId = eventId; categoryId = context.Events.FirstOrDefault(x => x.EventId == eventId).CategoryId; }