Example #1
0
        public static TEntity Get <TEntity>(this IEntityQuery query, object keyValue)
            where TEntity : AbstractEntity
        {
            var entity = query.Find <TEntity>(keyValue);

            if (entity == null)
            {
                throw new EntityNotFoundException(typeof(TEntity), new [] { keyValue });
            }

            return(entity);
        }
Example #2
0
 public static TEntity Find <TEntity>(this IEntityQuery query, object keyValue)
     where TEntity : AbstractEntity
 {
     return(query.Find <TEntity>(new [] { keyValue }));
 }