コード例 #1
0
 public ActionResult Create(Product product)
 {
     if (!ModelState.IsValid)
     {
         return(View(product));
     }
     else
     {
         context.Insert(product);
         context.Commit();
         return(RedirectToAction("Index"));
     }
 }
コード例 #2
0
        public void Update(Shot shot)
        {
            t_shot entity = _sqlRepository.Find(_ => _.ShotId == shot.ShotId).Single();

            entity.UpdateEntity(shot);
            _sqlRepository.Commit();
        }
コード例 #3
0
        public void Update(ShooterCollection shooterCollection)
        {
            t_shootercollection entity = _sqlRepository.Find(_ => _.ShooterCollectionId == shooterCollection.ShooterCollectionId).Single();

            entity.UpdateEntity(shooterCollection);
            _sqlRepository.Commit();
        }
コード例 #4
0
        public void Update(Shooter shooter)
        {
            t_shooter entity = _sqlRepository.Find(_ => _.ShooterId == shooter.ShooterId).Single();

            entity.UpdateEntity(shooter);
            _sqlRepository.Commit();
        }
コード例 #5
0
        public void Update(Session session)
        {
            t_session entity = _sqlRepository.Find(_ => _.SessionId == session.SessionId).Single();

            entity.UpdateEntity(session);
            _sqlRepository.Commit();
        }
コード例 #6
0
        public void Update(CollectionShooter collectionShooter)
        {
            t_collectionshooter entity = _sqlRepository.Find(_ => _.CollectionShooterId == collectionShooter.CollectionShooterId).Single();

            entity.UpdateEntity(collectionShooter);
            _sqlRepository.Commit();
        }
コード例 #7
0
        public void Update(Person person)
        {
            t_person entity = _sqlRepository.Find(_ => _.PersonId == person.PersonId).Single();

            entity.UpdateEntity(person);
            _sqlRepository.Commit();
        }
コード例 #8
0
        public void Update(SubSession sessionSubtotal)
        {
            t_sessionsubtotal entity =
                _sqlRepository.Find(_ => _.SessionSubtotalId == sessionSubtotal.SessionSubtotalId).Single();

            entity.UpdateEntity(sessionSubtotal);
            _sqlRepository.Commit();
        }
コード例 #9
0
        public void Update(ShooterNumberConfig shooterNumberConfig)
        {
            t_shooternumberconfig entity =
                _sqlRepository.Find(_ => _.ShooterNumberConfigId == shooterNumberConfig.ShooterNumberConfigId).Single();

            entity.UpdateEntity(shooterNumberConfig);
            _sqlRepository.Commit();
        }
コード例 #10
0
 internal virtual int Commit()
 {
     return(Repository.Commit());
 }