dotnet-object-storage/PoweredSoft.ObjectStorage.Core/IObjectStorageCollection.cs

25 lines
1.1 KiB
C#
Raw Normal View History

2019-02-12 22:53:22 -05:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
2019-02-12 23:39:55 -05:00
using System.Reflection;
2019-02-12 17:39:16 -05:00
using System.Threading;
using System.Threading.Tasks;
namespace PoweredSoft.ObjectStorage.Core
{
public interface IObjectStorageCollection<TEntity>
{
string CollectionName { get; }
2019-02-12 22:53:22 -05:00
Task<List<TEntity>> GetAllAsync(CancellationToken cancellationToken = default(CancellationToken));
Task<List<TEntity>> GetAllAsync(Expression<Func<TEntity, bool>> predicate, CancellationToken cancellationToken = default(CancellationToken));
Task<TEntity> GetAsync(object key, CancellationToken cancellationToken = default(CancellationToken));
2019-02-12 17:39:16 -05:00
Task<TEntity> AddAsync(TEntity entity, CancellationToken cancellationToken = default(CancellationToken));
Task DeleteAsync(TEntity entity, CancellationToken cancellationToken = default(CancellationToken));
Task<TEntity> UpdateAsync(TEntity entity, CancellationToken cancellationToken = default(CancellationToken));
2019-02-12 23:39:55 -05:00
IQueryable<TEntity> AsQueryable();
List<PropertyInfo> GetObjectKeys();
2019-02-12 17:39:16 -05:00
}
}