public IEntityMapper GetBase <T>() { var m = new MyMapper(); m.Freeze(); return(m); }
//[Fact] //public void Try_Get_identity_from_my_local_LocalDb_so_that_this_test_is_screwed_on_the_build_server() //{ // var entity = new MyEntity { Id = 1, Name = "Arne" }; // EntityMappingProvider.Provider = this; // var conStr = @"Data Source=(localdb)\ProjectsV12;Initial Catalog=GriffinFrameworkTests;Integrated Security=True;"; // using (var connection = new SqlConnection(conStr)) // { // connection.Open(); // using (var uow = new AdoNetUnitOfWork(connection)) // { // uow.Insert(entity); // uow.SaveChanges(); // } // } // entity.Id.Should().NotBe(0); //} //[Fact] //public void Try_Get_identity_from_my_local_LocalDb_so_that_this_test_is_screwed_on_the_build_server() //{ // var entity = new MyEntity { Id=1, Name = "Arne" }; // EntityMappingProvider.Provider = this; // var conStr = @"Data Source=(localdb)\ProjectsV12;Initial Catalog=GriffinFrameworkTests;Integrated Security=True;"; // using (var connection = new SqlConnection(conStr)) // { // connection.Open(); // using (var uow = new AdoNetUnitOfWork(connection)) // { // uow.Insert(entity); // uow.SaveChanges(); // } // } // entity.Id.Should().NotBe(0); //} //[Fact] //public async Task Try_Get_identity_from_my_local_LocalDb_so_that_this_test_is_screwed_on_the_build_server___async_version() //{ // var entity = new MyEntity { Name = "Arne" }; // EntityMappingProvider.Provider = this; // var conStr = @"Data Source=(localdb)\ProjectsV12;Initial Catalog=GriffinFrameworkTests;Integrated Security=True;"; // using (var connection = new SqlConnection(conStr)) // { // connection.Open(); // using (var uow = new AdoNetUnitOfWork(connection)) // { // await uow.InsertAsync(entity); // uow.SaveChanges(); // } // } // entity.Id.Should().NotBe(0); //} public ICrudEntityMapper Get <TEntity>() { var m = new MyMapper(); m.Freeze(); return(m); }