public IEnumerable <NotificationModel> Handle(GetNotificationForUserIdQuery query) { var notifications = _notificationRepository.GetAll().Where(x => x.Login.Id == query.UserId && x.IsDisplayed == false); //TODO: Set IsDisplayed to false //_notificationRepository.Update() return(notifications.Select(x => new NotificationModel { Message = x.Message })); }
public void Init() { var assembly = typeof(ICoreAssemblyMarker).Assembly; var builder = new ContainerBuilder(); //Initialize all autofac modules in assembly builder.RegisterAssemblyModules(assembly); _container = builder.Build(); _moneyTransfer = new MoneyTransferCommand { Amount = 100, ReceiverAccountId = 1, SenderAccountId = 2 }; _notificationQuery = new GetNotificationForUserIdQuery { UserId = 1 }; }