/// <summary> /// Create a new ProductType object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="type">Initial value of the Type property.</param> public static ProductType CreateProductType(global::System.Guid id, global::System.String type) { ProductType productType = new ProductType(); productType.ID = id; productType.Type = type; return productType; }
public ProductsViewModel(ProductType productType) { var dataUnitLocator = ContainerAccessor.Instance.GetContainer().Resolve<IDataUnitLocator>(); _adminDataUnit = dataUnitLocator.ResolveDataUnit<IAdminDataUnit>(); _reportsDataUnit = dataUnitLocator.ResolveDataUnit<IReportsDataUnit>(); _eventsDataUnit = dataUnitLocator.ResolveDataUnit<IEventDataUnit>(); SelectedProductType = productType; DeleteProductCommand = new RelayCommand<ProductModel>(DeleteProductCommandExecuted); EditProductCommand = new RelayCommand<ProductModel>(EditProductCommandExecuted); }
/// <summary> /// Deprecated Method for adding a new object to the ProductTypes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProductTypes(ProductType productType) { base.AddObject("ProductTypes", productType); }