CQRS_Simple/CQRS_Simple.Infrastructure/Dapper/IDapperRepository.cs
2022-04-07 14:00:58 +08:00

17 lines
510 B
C#

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace CQRS_Simple.Infrastructure.Dapper
{
public interface IDapperRepository<T, TC> where T : Entity<TC>
{
Task<TC> AddAsync(T item);
Task<int> RemoveAsync(T item);
Task<int> UpdateAsync(T item);
Task<T> GetByIdAsync(TC id);
Task<IEnumerable<T>> FindAsync(Expression<Func<T, bool>> predicate);
Task<IEnumerable<T>> GetAllAsync();
}
}