@@ -76,11 +76,11 @@ public virtual void SetupTestFixture()
7676
7777 Renters = new List < Renter > ( )
7878 {
79- new Renter ( ) { PersonID = 1 , UnitID = 1 , StartDate = new DateTime ( 1980 , 01 , 01 ) , EndDate = new DateTime ( 1990 , 02 , 28 ) } ,
80- new Renter ( ) { PersonID = 2 , UnitID = 1 , StartDate = new DateTime ( 1990 , 03 , 01 ) } ,
81- new Renter ( ) { PersonID = 3 , UnitID = 2 , StartDate = new DateTime ( 1980 , 03 , 01 ) , EndDate = new DateTime ( 2000 , 01 , 01 ) } ,
82- new Renter ( ) { PersonID = 1 , UnitID = 3 , StartDate = new DateTime ( 1990 , 03 , 01 ) } ,
83- new Renter ( ) { PersonID = 4 , UnitID = 4 , StartDate = new DateTime ( 2000 , 01 , 01 ) }
79+ new Renter ( ) { PersonID = 1 , UnitID = 1 , Rent = 100M , StartDate = new DateTime ( 1980 , 01 , 01 ) , EndDate = new DateTime ( 1990 , 02 , 28 ) } ,
80+ new Renter ( ) { PersonID = 2 , UnitID = 1 , Rent = 150M , StartDate = new DateTime ( 1990 , 03 , 01 ) } ,
81+ new Renter ( ) { PersonID = 3 , UnitID = 2 , Rent = 200M , StartDate = new DateTime ( 1980 , 03 , 01 ) , EndDate = new DateTime ( 2000 , 01 , 01 ) } ,
82+ new Renter ( ) { PersonID = 1 , UnitID = 3 , Rent = 250M , StartDate = new DateTime ( 1990 , 03 , 01 ) } ,
83+ new Renter ( ) { PersonID = 4 , UnitID = 4 , Rent = 300M , StartDate = new DateTime ( 2000 , 01 , 01 ) }
8484 } ;
8585
8686 RealEstateProperties = new List < RealEstateProperty > ( )
@@ -117,14 +117,19 @@ FROM [dbo].[Person] AS [T1]
117117WHERE ([T1].[ID] > @id_1)" ,
118118 people_less_than = @"SELECT [T1].[ID], [T1].[FirstName], [T1].[MiddleInitial], [T1].[FamilyName], [T1].[FullName]
119119FROM [dbo].[Person] AS [T1]
120- WHERE ([T1].[ID] < @id_1)" ;
120+ WHERE ([T1].[ID] < @id_1)" ,
121+ renter_byperson = @"SELECT [T1].[PersonID], [T1].[UnitID], [T1].[Rent], [T1].[StartDate], [T1].[EndDate]
122+ FROM [dbo].[Renter] AS [T1]
123+ WHERE ([T1].[PersonID] == @personid_1)" ;
121124
122125 Context . Database . Instance . AddCommandBehavior ( people_all , cmd => People . ToDataTable ( ) ) ;
123126 Context . Database . Instance . AddCommandBehavior ( people_all_count , cmd => People . Count ( ) ) ;
124127 Context . Database . Instance . AddCommandBehavior ( people_all_long_count , cmd => People . LongCount ( ) ) ;
125128 Context . Database . Instance . AddCommandBehavior ( people_greater_than , cmd => People . Where ( x => x . ID > cmd . Parameters [ "@id_1" ] . GetValue < int > ( ) ) . ToDataTable ( ) ) ;
126129 Context . Database . Instance . AddCommandBehavior ( people_equal , cmd => People . Where ( x => x . ID == cmd . Parameters [ "@id_1" ] . GetValue < int > ( ) ) . ToDataTable ( ) ) ;
127130 Context . Database . Instance . AddCommandBehavior ( people_less_than , cmd => People . Where ( x => x . ID < cmd . Parameters [ "@id_1" ] . GetValue < int > ( ) ) . ToDataTable ( ) ) ;
131+
132+ Context . Database . Instance . AddCommandBehavior ( renter_byperson , cmd => Renters . Where ( x => x . PersonID == cmd . Parameters [ "@personid_1" ] . GetValue < int > ( ) ) . ToDataTable ( ) ) ;
128133 }
129134
130135 protected virtual void SetInsertBehaviors ( )
0 commit comments