public void CreateProduct(string name, string description, ModelTypeDefinition type, ColorDefinition color, decimal price) { if (string.IsNullOrWhiteSpace(name)) { throw new EShopException("name can't be empty or whitespace"); } _eventStore.Publish(new ProductCreated { Id = Guid.NewGuid(), Name = name, Description = description, Type = type, Color = color, Price = price }); }
public ModelType(ModelTypeDefinition modelTypeDefinition) { ModelTypeDefinition = modelTypeDefinition; }