File tree 2 files changed +29
-1
lines changed
2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,22 @@ public interface IQuery
510
510
/// <param name="val">A non-null instance of a <see cref="DateTime"/>.</param>
511
511
IQuery SetTimestamp ( string name , DateTime val ) ;
512
512
513
+ /// <summary>
514
+ /// Bind an instance of a <see cref="Guid" /> to a named parameter
515
+ /// using an NHibernate <see cref="GuidType"/>.
516
+ /// </summary>
517
+ /// <param name="position">The position of the parameter in the query string, numbered from <c>0</c></param>
518
+ /// <param name="val">An instance of a <see cref="Guid"/>.</param>
519
+ IQuery SetGuid ( int position , Guid val ) ;
520
+
521
+ /// <summary>
522
+ /// Bind an instance of a <see cref="Guid" /> to a named parameter
523
+ /// using an NHibernate <see cref="GuidType"/>.
524
+ /// </summary>
525
+ /// <param name="name">The name of the parameter</param>
526
+ /// <param name="val">An instance of a <see cref="Guid"/>.</param>
527
+ IQuery SetGuid ( string name , Guid val ) ;
528
+
513
529
/// <summary>
514
530
/// Override the current session flush mode, just for this query.
515
531
/// </summary>
Original file line number Diff line number Diff line change @@ -373,7 +373,19 @@ public IQuery SetTimestamp( string name, DateTime val )
373
373
return this ;
374
374
}
375
375
376
- public IQuery SetEntity ( string name , object val )
376
+ public IQuery SetGuid ( string name , Guid val )
377
+ {
378
+ SetParameter ( name , val , NHibernateUtil . Guid ) ;
379
+ return this ;
380
+ }
381
+
382
+ public IQuery SetGuid ( int position , Guid val )
383
+ {
384
+ SetParameter ( position , val , NHibernateUtil . Guid ) ;
385
+ return this ;
386
+ }
387
+
388
+ public IQuery SetEntity ( string name , object val )
377
389
{
378
390
SetParameter ( name , val , NHibernateUtil . Entity ( NHibernateProxyHelper . GuessClass ( val ) ) ) ;
379
391
return this ;
You can’t perform that action at this time.
0 commit comments