public Subscription(StudentAddedNotificationService service) { Name = "Subscription"; AddField(new EventStreamFieldType { Name = "studentAdded", Type = typeof(StudenAddedMessageType), Resolver = new FuncFieldResolver <StudenAddedMessage>(c => c.Source as StudenAddedMessage), Subscriber = new EventStreamResolver <StudenAddedMessage>(c => service.GetMessages()) }); }
public StudentRepository(CourseContext context, StudentAddedNotificationService notificationService) { _context = context; _notificationService = notificationService; }