2024-03-15 21:35:24 -05:00
|
|
|
namespace AAIntegration.SimmonsBank.API.Config;
|
2024-03-15 21:17:05 -05:00
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using AAIntegration.SimmonsBank.API.Entities;
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
2024-03-15 21:35:24 -05:00
|
|
|
using Internal;
|
2024-03-15 21:17:05 -05:00
|
|
|
using System.Linq;
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
|
|
|
public class DataContext : DbContext
|
|
|
|
{
|
|
|
|
//protected readonly IConfiguration Configuration;
|
|
|
|
readonly ILogger<DataContext> _logger;
|
|
|
|
|
|
|
|
public DataContext(
|
|
|
|
DbContextOptions<DataContext> options,
|
|
|
|
ILogger<DataContext> logger)
|
|
|
|
: base(options)
|
|
|
|
{
|
|
|
|
_logger = logger;
|
|
|
|
//Configuration = configuration;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
|
|
{
|
|
|
|
// in memory database used for simplicity, change to a real db for production applications
|
|
|
|
options.UseInMemoryDatabase("TestDb");
|
|
|
|
}*/
|
|
|
|
|
|
|
|
public DbSet<User> Users { get; set; }
|
2024-03-15 21:35:24 -05:00
|
|
|
public DbSet<Account> Accounts { get; set; }
|
|
|
|
public DbSet<Transaction> Transactions { get; set; }
|
2024-03-15 21:17:05 -05:00
|
|
|
}
|