Exemplo n.º 1
0
 public void DeleteWork(DeleteWorkCommand command)
 {
     var evnt = new WorkDeletedEvent
                   {
                       AggregateRootId = command.CompanyId,
                       WorkId = command.WorkId
                   };
     Apply(evnt);
 }
Exemplo n.º 2
0
        public ActionResult DeleteWork(Guid companyId, Guid workId)
        {
            var command = new DeleteWorkCommand
                              {
                                  CompanyId = companyId,
                                  WorkId = workId
                              };

            return Handle(command,
                          RedirectToAction("WorkEdit", new { id = companyId }),
                          RedirectToAction("WorkEdit", new { id = companyId }));
        }