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

            return Handle(form,
                RedirectToAction("Details", new { id = form.CompanyId }),
                RedirectToAction("Create"));
        }
예제 #2
0
파일: Company.cs 프로젝트: Pechalka/Diplome
 public Company(CreateComanyCommand create)
 {
     Apply(new CompanyAddedEvent { AggregateRootId = create.CompanyId, UserId  =  create.OwnerUserId, Name = create.Name, Description = create.Description, Category = create.Category});
 }