File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
SmartSql.Test.Unit/DyRepository
SmartSql.Test/Repositories Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,18 @@ public void QueryDictionary()
3535 [ Theory ]
3636 [ InlineData ( 1 , NumericalEnum11 . One ) ]
3737 [ InlineData ( 2 , NumericalEnum11 . Two ) ]
38- public void GetNumericalEnums ( int id , NumericalEnum11 numericalEnum )
38+ public void GetNumericalEnums ( int value , NumericalEnum11 numericalEnum )
3939 {
4040 var list = _mapper . Query < NumericalEnum11 ? > ( new RequestContext
4141 {
42- RealSql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE Id = ?id " ,
43- Request = new { id }
42+ RealSql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE NumericalEnum = ?value " ,
43+ Request = new { value }
4444 } ) ;
4545
4646 Assert . NotNull ( list ) ;
4747 Assert . True ( list . All ( t => t == numericalEnum ) ) ;
4848
49- var result = _repository . GetNumericalEnums ( id ) ;
49+ var result = _repository . GetNumericalEnums ( value ) ;
5050
5151 Assert . NotNull ( result ) ;
5252 Assert . True ( result . All ( t => t == numericalEnum ) ) ;
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ public interface IAllPrimitiveRepository
2828 [ Statement ( Id = "QueryDictionary" , Sql = "SELECT T.* From T_AllPrimitive T limit ?Taken" ) ]
2929 IList < IDictionary < string , object > > QueryDictionary ( [ Param ( "Taken" ) ] int taken ) ;
3030
31- [ Statement ( Sql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE Id = ?id " ) ]
32- List < NumericalEnum11 > GetNumericalEnums ( int id ) ;
31+ [ Statement ( Sql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE NumericalEnum = ?numericalEnum " ) ]
32+ List < NumericalEnum11 > GetNumericalEnums ( int numericalEnum ) ;
3333
3434 [ Statement ( Sql = "truncate table T_AllPrimitive" ) ]
3535 void Truncate ( ) ;
You can’t perform that action at this time.
0 commit comments