Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <typeparam name="TEntity"></typeparam>
 /// <typeparam name="TKey"></typeparam>
 /// <typeparam name="TProperty"></typeparam>
 /// <param name="repository"></param>
 /// <param name="entity"></param>
 /// <param name="propertyExpression"></param>
 public static void EnsurePropertyLoaded <TEntity, TKey, TProperty>(
     this IBasicRepository <TEntity, TKey> repository,
     TEntity entity,
     Expression <Func <TEntity, TProperty> > propertyExpression
     )
     where TEntity : class, IEntity <TKey>
     where TProperty : class => AsyncHelper.RunSync(() => repository.EnsurePropertyLoadedAsync(entity, propertyExpression));