public Product Create(CreateProductCommand command) { var product = new Product(command.Title, command.Description, command.Price, command.QuantityOnHand, command.CategoryId); product.Register(); _repository.Create(product); if (Commit()) return product; return null; }