public void SqlServerShouldHandleBigFields() { var recordDescriptors = new[] { new RecordBlueprint { TableName = "Big", Type = typeof(BigRecord) } }; ProviderUtilities.RunWithSqlServer(recordDescriptors, sessionFactory => { var session = sessionFactory.OpenSession(); var foo = new BigRecord { Body = new String('x', 10000), Banner = new String(' ', 10000) }; session.Insert(foo); // session.Flush(); session.Close(); session = sessionFactory.OpenSession(); foo = session.Get <BigRecord>(foo.Id); session.Close(); Assert.NotNull(foo); Assert.Equal(foo.Body, new String('x', 10000)); Assert.Equal(foo.Banner.Length, 10000); }); }
public void Init() { _databaseFilePath = Path.GetTempFileName(); //_sessionFactory = DataUtility.CreateSessionFactory(_databaseFilePath, typeof(FooRecord)); ProviderUtilities.RunWithSqlServer(null, sessionFactory => { _session = sessionFactory.OpenSession(); _fooRepos = new Repository <FooRecord>(new TestTransactionManager(_session)); }, true); }