diff --git a/DigitalData.Core.Abstraction.Application/Repository/IRepository.cs b/DigitalData.Core.Abstraction.Application/Repository/IRepository.cs index 3e14e98..a20ef82 100644 --- a/DigitalData.Core.Abstraction.Application/Repository/IRepository.cs +++ b/DigitalData.Core.Abstraction.Application/Repository/IRepository.cs @@ -1,50 +1,105 @@ using DigitalData.Core.Abstractions.Interfaces; using System.Linq.Expressions; +#if NETFRAMEWORK +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using System.Linq; +#endif -namespace DigitalData.Core.Abstraction.Application.Repository; +namespace DigitalData.Core.Abstraction.Application.Repository +#if NET + ; +#elif NETFRAMEWORK + { +#endif public interface IRepository { #region Create - public Task CreateAsync(TEntity entity, CancellationToken cancel = default); +#if NET + public +#endif + Task CreateAsync(TEntity entity, CancellationToken cancel = default); - public Task> CreateAsync(IEnumerable entities, CancellationToken cancel = default); +#if NET + public +#endif + Task> CreateAsync(IEnumerable entities, CancellationToken cancel = default); - public Task CreateAsync(TDto dto, CancellationToken cancel = default); +#if NET + public +#endif + Task CreateAsync(TDto dto, CancellationToken cancel = default); - public Task> CreateAsync(IEnumerable dtos, CancellationToken cancel = default); +#if NET + public +#endif + Task> CreateAsync(IEnumerable dtos, CancellationToken cancel = default); #endregion Create #region Read - public IQueryable Where(Expression> expression); +#if NET + public +#endif + IQueryable Where(Expression> expression); - public IEnumerable GetAll(); +#if NET + public +#endif + IEnumerable GetAll(); - public Task> GetAllAsync(CancellationToken cancel = default); +#if NET + public +#endif + Task> GetAllAsync(CancellationToken cancel = default); #endregion Read #region Update - public Task UpdateAsync(TDto dto, Expression> expression, CancellationToken cancel = default); +#if NET + public +#endif + Task UpdateAsync(TDto dto, Expression> expression, CancellationToken cancel = default); - public Task UpdateAsync(TDto dto, Func, IQueryable> query, CancellationToken cancel = default); +#if NET + public +#endif + Task UpdateAsync(TDto dto, Func, IQueryable> query, CancellationToken cancel = default); #endregion Update #region Delete - public Task DeleteAsync(Expression> expression, CancellationToken cancel = default); +#if NET + public +#endif + Task DeleteAsync(Expression> expression, CancellationToken cancel = default); - public Task DeleteAsync(Func, IQueryable> query, CancellationToken cancel = default); +#if NET + public +#endif + Task DeleteAsync(Func, IQueryable> query, CancellationToken cancel = default); #endregion Delete #region Obsolete [Obsolete("Use CreateAsync, UpdateAsync or DeleteAsync")] - public IQueryable Read(); +#if NET + public +#endif + IQueryable Read(); [Obsolete("Use IRepository.Where")] - public IQueryable ReadOnly(); +#if NET + public +#endif + IQueryable ReadOnly(); #endregion } public interface IRepository { - public IRepository Entity() where TEntity : IEntity; -} \ No newline at end of file + IRepository Entity() where TEntity : IEntity; +} + +#if NETFRAMEWORK + } +#endif \ No newline at end of file