예제 #1
0
        protected override void LoadTestData()
        {
            var repository = new NHibernateRepository<Product>();

              for (var id = 1; id <= 100; ++id) {
            var name = string.Format("Product {0:d3}", id);
            var product = new Product { ProductName = name };
            repository.Save(product);
              }
        }
 protected override void LoadTestData()
 {
     var product = new Product { ProductName = "Test" };
       this.productRepository.SaveOrUpdate(product);
 }
 public void CanSaveProduct()
 {
     var product = new Product { ProductName = "Test" };
       this.productRepository.SaveOrUpdate(product);
 }
예제 #4
0
 public Product Create(string name)
 {
     var product = new Product { ProductName = name };
       this.productRepository.SaveOrUpdate(product);
       return product;
 }