Пример #1
0
        public async Task <IActionResult> RemoveRequirement(Guid vacancy, Guid clientId, Guid requirementId)
        {
            if (vacancy != Guid.Empty && clientId != Guid.Empty && requirementId != Guid.Empty)
            {
                var cmd    = new RemoveRequirementCommand(requirementId, clientId, vacancy);
                var result = await _mediator.Send(cmd);

                if (result.IsFailure)
                {
                    ViewBag.Notify = result.Error; // todo: toastr
                }
            }
            return(Ok());
        }
Пример #2
0
 public void Delete(RemoveRequirementCommand command)
 {
     _removeRequirementCommandHandler.Handle(command);
 }