コード例 #1
0
ファイル: Facade.svc.cs プロジェクト: morganeheng/MyMovie.Net
        public void DeleteImage(int Id_image)
        {
            Image entity = imageDao.SelectOne(Id_image);

            if (entity != null)
            {
                imageDao.Delete(entity);
            }
        }
コード例 #2
0
        public override void UpgradeToTargetVersion(IConnection connection)
        {
            var dao = new ImageDao(TargetVersion.GetType());

            dao.CurrentConnection = connection;
            dao.CreateTableIfNotExists();
            ++ModifiedCount;
            dao.CreateIndexIfNotExists();
            ++ModifiedCount;

            if (dao.CountAll() > 0)
            {
                dao.Delete(new Dictionary <string, object>());
            }

            dao.UpgradeTable(new VersionChangeUnit(typeof(VersionOrigin), TargetVersion.GetType()));
        }