Example #1
0
        public ActionResult Create(CreateComanyCommand form)
        {
            form.CompanyId = Guid.NewGuid();

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