public void SetUp() { TestHelper.SetDataDirectoryToAppDirectory(); var context = new ExampleAppContext("MvcBootstrap.ExampleApp.Data.Tests"); this.repository = new EmployeesRepository(context); }
public void CanConnectToDatabase() { var context = new ExampleAppContext("MvcBootstrap.ExampleApp.Web"); Assert.That(() => context.Database.Connection.Open(), Throws.Nothing); Assert.That(context.Database.Connection.State, Is.EqualTo(ConnectionState.Open)); }
public void SetUp() { TestHelper.SetDataDirectoryToAppDirectory(); var context = new ExampleAppContext("MvcBootstrap.ExampleApp.Data.Tests"); context.Database.Delete(); var repository = new EmployeesRepository(context); var employee = repository.CreateAndAdd(); employee.Name = "Fred"; repository.SaveChanges(); }
public ProjectManagerRepository(ExampleAppContext dbContext) : base(dbContext) { }
public EntityRepository(ExampleAppContext dbContext) { _dbContext = dbContext; }
public ActionLogRepository(ExampleAppContext dbContext) : base(dbContext) { }
public UserRepository(ExampleAppContext dbContext) : base(dbContext) { }