public void EnableProductOwner(EnableProductOwnerCommand command) { var tenantId = new TenantId(command.TenantId); ApplicationServiceLifeCycle.Begin(); try { var productOwner = this.productOwnerRepository.Get(tenantId, command.Username); if (productOwner != null) { productOwner.Enable(command.OccurredOn); } else { productOwner = new ProductOwner(tenantId, command.Username, command.FirstName, command.LastName, command.EmailAddress, command.OccurredOn); this.productOwnerRepository.Save(productOwner); } ApplicationServiceLifeCycle.Success(); } catch (Exception ex) { ApplicationServiceLifeCycle.Fail(ex); } }