Пример #1
0
 /// <summary>
 /// IDをキーとして削除する
 /// </summary>
 /// <param name="id">ID</param>
 internal void DeleteById(long id)
 {
     using (var database = new MyLogDatabase(Constants.DatabaseFile())) {
         try {
             database.Open();
             database.BeginTrans();
             var eneityHeader = new LogEntity(database);
             eneityHeader.DeleteById(id);
             var entityDetail = new LogDetailEntity(database);
             entityDetail.DeleteById(id);
             database.CommitTrans();
         } catch (Exception ex) {
             database.RollbackTrans();
             throw ex;
         }
     }
 }