mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-23 11:12:50 +08:00
34 lines
767 B
C#
34 lines
767 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FreeSql {
|
|
public interface IBasicRepository<TEntity> : IReadOnlyRepository<TEntity>
|
|
where TEntity : class {
|
|
TEntity Insert(TEntity entity);
|
|
|
|
List<TEntity> Insert(List<TEntity> entity);
|
|
|
|
Task<TEntity> InsertAsync(TEntity entity);
|
|
|
|
Task<List<TEntity>> InsertAsync(List<TEntity> entity);
|
|
|
|
int Update(TEntity entity);
|
|
|
|
Task<int> UpdateAsync(TEntity entity);
|
|
|
|
IUpdate<TEntity> UpdateDiy { get; }
|
|
|
|
int Delete(TEntity entity);
|
|
|
|
Task<int> DeleteAsync(TEntity entity);
|
|
}
|
|
|
|
public interface IBasicRepository<TEntity, TKey> : IBasicRepository<TEntity>, IReadOnlyRepository<TEntity, TKey>
|
|
where TEntity : class {
|
|
int Delete(TKey id);
|
|
|
|
Task<int> DeleteAsync(TKey id);
|
|
}
|
|
}
|
|
|