/// <summary> /// Provides a deterministic way to create the ProductPackagingViewModel property. /// </summary> public static void CreateProductPackagingTestViewModel() { if (_productPackagingTestViewModel == null) { //Trigger to add productpackaging for testing //if (ppr.GetAll().Count() == 0) //{ // ProductPackagingLocal ppl = new ProductPackagingLocal // { // DateCreated = DateTime.Now, // MasterId = Guid.NewGuid(), // Description = "300ml RGBx24", // Name = "Coke 300ml", // StatusId =(int)EntityStatus.Active , // DateLastUpdated = DateTime.Now // }; // //ppr.AddOrReplace(ppl); // ProductPackagingLocal ppl2 = new ProductPackagingLocal // { // DateCreated = DateTime.Now, // MasterId = Guid.NewGuid(), // Description = "300ml RGBx24", // Name = "Coke 300ml", // StatusId =(int)EntityStatus.Active , // DateLastUpdated = DateTime.Now // }; // // ppr.AddOrReplace(ppl2); //} _productPackagingTestViewModel = new ProductPackagingTestViewModel(); } }
/// <summary> /// Provides a deterministic way to delete the ProductPackagingViewModel property. /// </summary> public static void ClearProductPackagingViewModel() { _productPackagingTestViewModel.Cleanup(); _productPackagingTestViewModel = null; }