internal static SoaRowsRepo1 CreateInMemoryShard(this MonthShardPassbookDB monthDb) { var moRepo = monthDb.GetSoaRepo(); var pbkDB = new PassbookDB(monthDb.BankAccountId, new MemoryStream(), monthDb.CurrentUser); return(new SoaRowsRepo1(moRepo.BaseBalance, moRepo.BaseDate, pbkDB)); }
internal static SoaRowsRepo1 CreateFileBasedShard(this MonthShardPassbookDB monthDb, DateTime day1) { var moRepo = monthDb.GetSoaRepo(); var dbPath = Path.Combine(monthDb.GetShardsDir(), GetFilename(day1)); var pbkDB = new PassbookDB(monthDb.BankAccountId, dbPath, monthDb.CurrentUser); return(new SoaRowsRepo1(moRepo.BaseBalance, moRepo.BaseDate, pbkDB)); }