protected SqliteTestBase() { _connection = new SqliteConnection(InMemoryConnectionString); _connection.Open(); var options = new DbContextOptionsBuilder <AccountantContext>() .UseSqlite(_connection) .Options; DbContext = new AccountantContext(options); DbContext.Database.EnsureCreated(); }
static void Main(string[] args) { DateTime dat = DateTime.Parse("06/mag/2019", System.Globalization.CultureInfo.GetCultureInfo("it-IT")); string path = "C:\\Users\\Kawik.B\\Documents\\Timesheets"; Repository repo = new Repository(); var files = Directory.GetFiles(path); //var works = repo.InsertWorks(); //var travels = repo.InsertTravels(); //var timesheets = repo.GetTimesheets(works, travels); PDFReader pDFReader = new PDFReader(); pDFReader.ReadAcroFieldsFromPDF(files); using (var context = new AccountantContext()) { context.Database.Log = Console.WriteLine; context.Works.AddRange(pDFReader.KeyValueWorks.Values); context.Travels.AddRange(pDFReader.KeyValueTravels.Values); context.Timesheets.AddRange(repo.GetTimesheets(pDFReader.KeyValueWorks.Values, pDFReader.KeyValueTravels.Values)); context.SaveChanges(); } Console.ReadLine(); }
public CategoryService(AccountantContext context) { _context = context; }
public BalanceRepository(AccountantContext context) { _context = context; }
public UserService(AccountantContext context) { _context = context; }
public ExpenseService(AccountantContext context) { _context = context; }
public EIncomeTypeController(AccountantContext context) { _context = context; }
public ESpendingTypeController(AccountantContext context) { _context = context; }
public GroupService(AccountantContext context) { _context = context; }
public SpendingRepository(AccountantContext context, IBalanceRepository balanceRepo) { _context = context; _balanceRepo = balanceRepo; }
public AnualBalanceRepository(AccountantContext context, IBalanceRepository balanceRepo) { _context = context; _balanceRepo = balanceRepo; }
public ReportService(AccountantContext context) { _context = context; }
public ShoppingListService(AccountantContext context) { _context = context; }