コード例 #1
0
        internal static TEntity GetSafely <TEntity, TKey>(this Row <TKey, byte[]> returnedRow)
        {
            if (returnedRow.Exists)
            {
                return((TEntity)ObjectHelper.ByteArrayToObject(returnedRow.Value));
            }

            return(default(TEntity));
        }
コード例 #2
0
        internal static IQueryable <TEntity> AsQueryable <TKey, TEntity>(this IEnumerable <Row <TKey, TEntity> > rows)
        {
            ICollection <TEntity> values = new List <TEntity>();

            foreach (Row <TKey, TEntity> row in rows)
            {
                values.Add((TEntity)ObjectHelper.ByteArrayToObject(row.GetValuePart(0)));
            }

            return(values.AsQueryable());
        }