예제 #1
0
 public static IMemoryDatabase GetDatabase <TEntity, TKey>(this IBasicRepository <TEntity, TKey> repository)
     where TEntity : class, IEntity <TKey>
 {
     return(repository.ToMemoryDbRepository().Database);
 }
예제 #2
0
 public static Task <IMemoryDatabaseCollection <TEntity> > GetCollectionAsync <TEntity, TKey>(this IBasicRepository <TEntity, TKey> repository)
     where TEntity : class, IEntity <TKey>
 {
     return(repository.ToMemoryDbRepository().GetCollectionAsync());
 }
 public static List <TEntity> GetCollection <TEntity, TKey>(this IBasicRepository <TEntity, TKey> repository)
     where TEntity : class, IEntity <TKey>
 {
     return(repository.ToMemoryDbRepository().Collection);
 }