public static T ReadSingle <T>(this IHop hopper, T instance) where T : class, new() { if (instance == null) { throw new ArgumentNullException("instance", "ReadSingle method expects an instance to read, not null."); } return(hopper.Read(new[] { instance }).FirstOrDefault()); }
public static T ReadSingle <T>(this IHop hopper, string whereClause = "") where T : new() { return(hopper.Read <T>(whereClause).FirstOrDefault()); }