Skip to content

Commit 5c82152

Browse files
Fixing a test db setup bug in build menu, adding files for testing sql server ce.
1 parent a2c1f2a commit 5c82152

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

ShowBuildMenu.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ set LIB_FILES2=
130130
goto test-setup-generic
131131

132132
:test-setup-generic
133+
set CFGNAME=
133134
set /p CFGNAME=Enter a name for your test configuration or press enter to use default name:
134135
if /I "%CFGNAME%"=="" set CFGNAME=%CONFIG_NAME%-%PLATFORM%
135136
mkdir "%AVAILABLE_CONFIGURATIONS%\%CFGNAME%"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
Installation steps for local testing:
3+
4+
1. Create a project referencing System.Data.SqlServerCe.dll
5+
2. Put following code in it, changing database file name and path as appropriate:
6+
using (var en = new SqlCeEngine("DataSource=\"C:\\SqlCeData\\NHibernate.sdf\""))
7+
{
8+
en.CreateDatabase();
9+
}
10+
3. Run it.
11+
4. Ensure your test configuration file references your newly created SQL Server CE database file. By example:
12+
<property name="connection.connection_string">
13+
Data Source=C:\SqlCeData\NHibernate.sdf
14+
</property>
15+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
This template was written to work with NHibernate.Test.
4+
Copy the template to your NHibernate.Test project folder and rename it in hibernate.cfg.xml and change it
5+
for your own use before compile tests in VisualStudio.
6+
-->
7+
<!-- This is the System.Data.dll provider for SQL Server -->
8+
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
9+
<session-factory name="NHibernate.Test">
10+
<property name="command_timeout">0</property>
11+
<property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</property>
12+
<property name="connection.connection_string">
13+
Data Source=NHibernate.sdf
14+
</property>
15+
<property name="dialect">NHibernate.Dialect.MsSqlCe40Dialect</property>
16+
</session-factory>
17+
</hibernate-configuration>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
This template was written to work with NHibernate.Test.
4+
Copy the template to your NHibernate.Test project folder and rename it in hibernate.cfg.xml and change it
5+
for your own use before compile tests in VisualStudio.
6+
-->
7+
<!-- This is the System.Data.dll provider for SQL Server -->
8+
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
9+
<session-factory name="NHibernate.Test">
10+
<property name="command_timeout">0</property>
11+
<property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</property>
12+
<property name="connection.connection_string">
13+
Data Source=NHibernate.sdf
14+
</property>
15+
<property name="dialect">NHibernate.Dialect.MsSqlCe40Dialect</property>
16+
</session-factory>
17+
</hibernate-configuration>

0 commit comments

Comments
 (0)