Example #1
0
        public async Task Handle(MarkProjectAsCompletedCommand message)
        {
            var jobOrder = repository.GetById <Project>(message.ProjectId);

            jobOrder.MarkAsCompleted(message.DateOfCompletion);
            await repository.SaveAsync(jobOrder);

            this.MarkAsComplete();
        }
Example #2
0
        public void MarkJobOrderAsCompleted(MarkProjectAsCompletedViewModel model)
        {
            var command = new MarkProjectAsCompletedCommand(model.ProjectId, model.DateOfCompletion);

            Bus.Send(command);
        }