public ActionResult Create(CreateComanyCommand form) { form.CompanyId = Guid.NewGuid(); return Handle(form, RedirectToAction("Details", new { id = form.CompanyId }), RedirectToAction("Create")); }
public Company(CreateComanyCommand create) { Apply(new CompanyAddedEvent { AggregateRootId = create.CompanyId, UserId = create.OwnerUserId, Name = create.Name, Description = create.Description, Category = create.Category}); }