-- begin VERSIONING ---------------------------------------------------------------------------------------------------------------------
https://github.com/rmcrackan/Libation/releases

v3.1-beta.2 : fixed known performance issue: Tag add/edit
v3.1-beta.1 : RELEASE TO BETA
v3.0.3 : Switch to SQLite. No longer relies on LocalDB, which must be installed separately
v3.0.2 : Final using LocalDB
v3.0.1 : Legacy inAudible wire-up code is still present but is commented out. All future check-ins are not guaranteed to have inAudible wire-up code
v3.0 : This version is fully powered by the Audible API. Legacy scraping code is still present but is commented out. All future check-ins are not guaranteed to have any scraping code
v2 : new library page scraping. still chrome cookies. all decryption is handled natively. no inAudible dependency
v1 : old library ajax scraping. wish list scraping. chrome cookies. directly call local inAudible. .net framework
-- end VERSIONING ---------------------------------------------------------------------------------------------------------------------

-- begin HOW TO PUBLISH ---------------------------------------------------------------------------------------------------------------------
OPTION 1: UI
rt-clk project project > Publish...
click Publish

OPTION 2: cmd line
change dir to folder containing project
  cd C:\[full...path]\Libation\LibationWinForm
this will use the parameters specified in csproj
dotnet publish -c Release

OPTION 3: cmd line, custom
open csproj
remove: PublishTrimmed, PublishReadyToRun, PublishSingleFile, RuntimeIdentifier
run customized publish. examples:
publish all platforms
  dotnet publish -c Release
publish win64 platform only
  dotnet publish -r win-x64 -c Release
publish win64 platform, single-file
  dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true
-- end HOW TO PUBLISH ---------------------------------------------------------------------------------------------------------------------

-- begin AUDIBLE DETAILS ---------------------------------------------------------------------------------------------------------------------
alternate book id (eg BK_RAND_006061) is called 'sku' , 'sku_lite' , 'prod_id' , 'product_id' in different parts of the site
-- end AUDIBLE DETAILS ---------------------------------------------------------------------------------------------------------------------

-- begin SOLUTION LAYOUT ---------------------------------------------------------------------------------------------------------------------
do NOT combine jsons for
- audible-scraped persistence: library, book details
- libation-generated persistence: FilePaths.json
- user-defined persistence: BookTags.json
-- end SOLUTION LAYOUT ---------------------------------------------------------------------------------------------------------------------

-- begin EF CORE ---------------------------------------------------------------------------------------------------------------------
transaction notes
-----------------
// https://msdn.microsoft.com/en-us/data/dn456843.aspx
// Rollback is called by transaction Dispose(). No need to call it explicitly
  using var dbContext = new LibationContext();
  using var dbContextTransaction = dbContext.Database.BeginTransaction();
  refreshAction(dbContext, productItems);
  dbContext.SaveChanges();
  dbContextTransaction.Commit();

aggregate root is transactional boundary
  // //context.Database.CurrentTransaction
  //var dbTransaction = Microsoft.EntityFrameworkCore.Storage.DbContextTransactionExtensions.GetDbTransaction(context.Database.CurrentTransaction);
  // // test with and without : using TransactionScope scope = new TransactionScope();
  //System.Transactions.Transaction.Current.TransactionCompleted += (sender, e) => { };
  // also : https://docs.microsoft.com/en-us/dotnet/api/system.transactions.transaction.enlistvolatile
-- end EF CORE ---------------------------------------------------------------------------------------------------------------------
