Skip to content

Commit 5b29313

Browse files
committed
Simplified the code a bit.
1 parent 7815d5c commit 5b29313

File tree

4 files changed

+14
-57
lines changed

4 files changed

+14
-57
lines changed

src/NHibernate.Test/BulkManipulation/Course.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ namespace NHibernate.Test.BulkManipulation
22
{
33
public class Course
44
{
5-
private long courseId;
6-
private string description;
7-
8-
public virtual long CourseId
9-
{
10-
get { return courseId; }
11-
set { courseId = value; }
12-
}
13-
14-
public virtual string Description
15-
{
16-
get { return description; }
17-
set { description = value; }
18-
}
5+
public virtual long CourseId { get; set; }
6+
public virtual string Description { get; set; }
197
}
208
}

src/NHibernate.Test/BulkManipulation/Enrolment.cs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,8 @@ namespace NHibernate.Test.BulkManipulation
55
[Serializable]
66
public class Enrolment
77
{
8-
private long enrolmentId;
9-
private Student student;
10-
private Course course;
11-
12-
public virtual long EnrolmentId
13-
{
14-
get { return enrolmentId; }
15-
set { enrolmentId = value; }
16-
}
17-
18-
public virtual Student Student
19-
{
20-
get { return student; }
21-
set { student = value; }
22-
}
23-
24-
public virtual Course Course
25-
{
26-
get { return course; }
27-
set { course = value; }
28-
}
8+
public virtual long EnrolmentId { get; set; }
9+
public virtual Student Student { get; set; }
10+
public virtual Course Course { get; set; }
2911
}
3012
}

src/NHibernate.Test/BulkManipulation/HQLBulkOperations.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ public void SimpleDelete()
3636
[Test, KnownBug("#3489")]
3737
public void InsertFromSelectWithMultipleAssociations()
3838
{
39-
using (var s = OpenSession())
40-
using (var tx = s.BeginTransaction())
41-
{
42-
s.CreateQuery("insert into Enrolment (Course, Student)" +
43-
" select e.Course, e.Student from Enrolment e")
44-
.ExecuteUpdate();
39+
using var s = OpenSession();
40+
using var tx = s.BeginTransaction();
4541

46-
tx.Commit();
47-
}
42+
s.CreateQuery("insert into Enrolment (Course, Student)" +
43+
" select e.Course, e.Student from Enrolment e")
44+
.ExecuteUpdate();
45+
46+
tx.Commit();
4847
}
4948
}
5049
}

src/NHibernate.Test/BulkManipulation/Student.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,7 @@ namespace NHibernate.Test.BulkManipulation
22
{
33
public class Student
44
{
5-
private long studentId;
6-
private string name;
7-
8-
public virtual long StudentId
9-
{
10-
get { return studentId; }
11-
set { studentId = value; }
12-
}
13-
14-
public virtual string Name
15-
{
16-
get { return name; }
17-
set { name = value; }
18-
}
5+
public virtual long StudentId { get; set; }
6+
public virtual string Name { get; set; }
197
}
208
}

0 commit comments

Comments
 (0)