Skip to content

Commit

Permalink
- v11.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
eben-roux committed Jul 16, 2019
1 parent 753a57f commit a3ae7a7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Shuttle.Core.Data/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
[assembly: AssemblyTitle(".NET Standard 2.0")]
#endif

[assembly: AssemblyVersion("11.0.3.0")]
[assembly: AssemblyVersion("11.0.4.0")]
[assembly: AssemblyCopyright("Copyright © Eben Roux 2019")]
[assembly: AssemblyProduct("Shuttle.Core.Data")]
[assembly: AssemblyCompany("Shuttle")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyInformationalVersion("11.0.3")]
[assembly: AssemblyInformationalVersion("11.0.4")]
[assembly: ComVisible(false)]
40 changes: 26 additions & 14 deletions Shuttle.Core.Data/RecordNotFoundExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
namespace Shuttle.Core.Data
{
public static class RecordNotFoundExtensions
{
public static T GuardAgainstRecordNotFound<T>(this T entity, object id) where T : class
{
if (entity == null)
{
throw RecordNotFoundException.For<T>(id);
}

return entity;
}
}
using System.Data;

namespace Shuttle.Core.Data
{
public static class RecordNotFoundExtensions
{
public static T GuardAgainstRecordNotFound<T>(this T entity, object id) where T : class
{
if (entity == null)
{
throw RecordNotFoundException.For<T>(id);
}

return entity;
}

public static DataRow GuardAgainstRecordNotFound<T>(this DataRow row, object id) where T : class
{
if (row == null)
{
throw RecordNotFoundException.For<T>(id);
}

return row;
}
}
}

0 comments on commit a3ae7a7

Please sign in to comment.