29 lines
942 B
C#
29 lines
942 B
C#
using System.Reflection;
|
|
using Hutopy.Application.Common.Interfaces;
|
|
using Hutopy.Domain.Entities;
|
|
using Hutopy.Infrastructure.Identity;
|
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Hutopy.Infrastructure.Data
|
|
{
|
|
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>, IApplicationDbContext
|
|
{
|
|
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
|
|
: base(options)
|
|
{
|
|
}
|
|
|
|
public DbSet<FutureCreator> FutureCreators => Set<FutureCreator>();
|
|
public DbSet<UserTransaction> UserTransactions => Set<UserTransaction>();
|
|
|
|
protected override void OnModelCreating(ModelBuilder builder)
|
|
{
|
|
base.OnModelCreating(builder);
|
|
|
|
// Apply configurations
|
|
builder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
|
|
}
|
|
}
|
|
}
|