forked from bilal-fazlani/tracker-enabled-dbcontext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestTrackerIdentityContext .cs
33 lines (29 loc) · 1.56 KB
/
TestTrackerIdentityContext .cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Data.Entity;
using Microsoft.AspNet.Identity.EntityFramework;
using TrackerEnabledDbContext.Common.Testing;
using TrackerEnabledDbContext.Common.Testing.Models;
namespace TrackerEnabledDbContext.Identity.IntegrationTests
{
public class TestTrackerIdentityContext : TrackerIdentityContext<IdentityUser>, ITestDbContext
{
protected static readonly string TestConnectionString = Environment.GetEnvironmentVariable("TestGenericConnectionString")
?? "DefaultTestConnection";
public TestTrackerIdentityContext()
: base(TestConnectionString)
{
Database.SetInitializer(new DropCreateDatabaseAlways<TestTrackerIdentityContext>());
}
public DbSet<NormalModel> NormalModels { get; set; }
public DbSet<ParentModel> ParentModels { get; set; }
public DbSet<ChildModel> Children { get; set; }
public DbSet<ModelWithCompositeKey> ModelsWithCompositeKey { get; set; }
public DbSet<ModelWithConventionalKey> ModelsWithConventionalKey { get; set; }
public DbSet<ModelWithSkipTracking> ModelsWithSkipTracking { get; set; }
public DbSet<POCO> POCOs { get; set; }
public DbSet<TrackedModelWithMultipleProperties> TrackedModelsWithMultipleProperties { get; set; }
public DbSet<TrackedModelWithCustomTableAndColumnNames> TrackedModelsWithCustomTableAndColumnNames { get; set; }
public DbSet<SoftDeletableModel> SoftDeletableModels { get; set; }
public DbSet<ModelWithComplexType> ModelsWithComplexType { get; set; }
}
}