add some new features in data service ...
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xModels.Base;
|
||||
|
||||
namespace xPushService.Interfaces
|
||||
{
|
||||
public interface IXBaseDtoHub<TEntity, TDto, TKey>
|
||||
where TEntity : XBaseEntity<TKey>
|
||||
where TDto : XBaseEntityDto<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// Notify a New Item added ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task Add(
|
||||
TDto item,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Notify a New Item added ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task AddOrUpdate(
|
||||
TDto item,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Notify Add Many Items ...
|
||||
/// </summary>
|
||||
/// <param name="items"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task AddMany(
|
||||
IEnumerable<TDto> items,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Notify an Item Deleted ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task Delete(
|
||||
TDto item,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Notify Delete Many Items ...
|
||||
/// </summary>
|
||||
/// <param name="items"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteMany(
|
||||
IEnumerable<TDto> items,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Notify an Item Updated ...
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task Update(
|
||||
TDto item,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Notify Update Many Items ...
|
||||
/// </summary>
|
||||
/// <param name="items"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateMany(
|
||||
IEnumerable<TDto> items,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user