Skip to content

Commit a3ae7a7

Browse files
committed
- v11.0.4
1 parent 753a57f commit a3ae7a7

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

Shuttle.Core.Data/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
[assembly: AssemblyTitle(".NET Standard 2.0")]
1414
#endif
1515

16-
[assembly: AssemblyVersion("11.0.3.0")]
16+
[assembly: AssemblyVersion("11.0.4.0")]
1717
[assembly: AssemblyCopyright("Copyright © Eben Roux 2019")]
1818
[assembly: AssemblyProduct("Shuttle.Core.Data")]
1919
[assembly: AssemblyCompany("Shuttle")]
2020
[assembly: AssemblyConfiguration("Release")]
21-
[assembly: AssemblyInformationalVersion("11.0.3")]
21+
[assembly: AssemblyInformationalVersion("11.0.4")]
2222
[assembly: ComVisible(false)]
Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
namespace Shuttle.Core.Data
2-
{
3-
public static class RecordNotFoundExtensions
4-
{
5-
public static T GuardAgainstRecordNotFound<T>(this T entity, object id) where T : class
6-
{
7-
if (entity == null)
8-
{
9-
throw RecordNotFoundException.For<T>(id);
10-
}
11-
12-
return entity;
13-
}
14-
}
1+
using System.Data;
2+
3+
namespace Shuttle.Core.Data
4+
{
5+
public static class RecordNotFoundExtensions
6+
{
7+
public static T GuardAgainstRecordNotFound<T>(this T entity, object id) where T : class
8+
{
9+
if (entity == null)
10+
{
11+
throw RecordNotFoundException.For<T>(id);
12+
}
13+
14+
return entity;
15+
}
16+
17+
public static DataRow GuardAgainstRecordNotFound<T>(this DataRow row, object id) where T : class
18+
{
19+
if (row == null)
20+
{
21+
throw RecordNotFoundException.For<T>(id);
22+
}
23+
24+
return row;
25+
}
26+
}
1527
}

0 commit comments

Comments
 (0)