|
From: <ric...@us...> - 2010-01-04 15:21:26
|
Revision: 4897
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4897&view=rev
Author: ricbrown
Date: 2010-01-04 15:20:56 +0000 (Mon, 04 Jan 2010)
Log Message:
-----------
Renamed QueryOver UniqueResult() to Single().
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs
trunk/nhibernate/src/NHibernate/IQueryOver.cs
trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs
Modified: trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2009-12-16 21:52:08 UTC (rev 4896)
+++ trunk/nhibernate/src/NHibernate/Criterion/QueryOver.cs 2010-01-04 15:20:56 UTC (rev 4897)
@@ -56,12 +56,12 @@
return criteria.List<U>();
}
- private TRoot UniqueResult()
+ private TRoot Single()
{
return criteria.UniqueResult<TRoot>();
}
- private U UniqueResult<U>()
+ private U Single<U>()
{
return criteria.UniqueResult<U>();
}
@@ -125,11 +125,11 @@
IList<U> IQueryOver<TRoot>.List<U>()
{ return List<U>(); }
- TRoot IQueryOver<TRoot>.UniqueResult()
- { return UniqueResult(); }
+ TRoot IQueryOver<TRoot>.Single()
+ { return Single(); }
- U IQueryOver<TRoot>.UniqueResult<U>()
- { return UniqueResult<U>(); }
+ U IQueryOver<TRoot>.Single<U>()
+ { return Single<U>(); }
IEnumerable<TRoot> IQueryOver<TRoot>.Future()
{ return Future(); }
Modified: trunk/nhibernate/src/NHibernate/IQueryOver.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/IQueryOver.cs 2009-12-16 21:52:08 UTC (rev 4896)
+++ trunk/nhibernate/src/NHibernate/IQueryOver.cs 2010-01-04 15:20:56 UTC (rev 4897)
@@ -49,12 +49,12 @@
/// <exception cref="HibernateException">
/// If there is more than one matching result
/// </exception>
- TRoot UniqueResult();
+ TRoot Single();
/// <summary>
- /// Override type of <see cref="UniqueResult()" />.
+ /// Override type of <see cref="Single()" />.
/// </summary>
- U UniqueResult<U>();
+ U Single<U>();
/// <summary>
/// Get a enumerable that when enumerated will execute
Modified: trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2009-12-16 21:52:08 UTC (rev 4896)
+++ trunk/nhibernate/src/NHibernate.Test/Criteria/Lambda/IntegrationFixture.cs 2010-01-04 15:20:56 UTC (rev 4897)
@@ -159,7 +159,7 @@
{
Person actual =
s.QueryOver<Person>()
- .UniqueResult();
+ .Single();
Assert.That(actual.Name, Is.EqualTo("test person 1"));
}
@@ -169,7 +169,7 @@
string actual =
s.QueryOver<Person>()
.Select(p => p.Name)
- .UniqueResult<string>();
+ .Single<string>();
Assert.That(actual, Is.EqualTo("test person 1"));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|