mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
add examples repository_01
This commit is contained in:
21
FreeSql.Repository/IReadOnlyRepository.cs
Normal file
21
FreeSql.Repository/IReadOnlyRepository.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FreeSql {
|
||||
public interface IReadOnlyRepository<TEntity> : IRepository
|
||||
where TEntity : class {
|
||||
|
||||
ISelect<TEntity> Select { get; }
|
||||
}
|
||||
|
||||
public interface IReadOnlyRepository<TEntity, TKey> : IReadOnlyRepository<TEntity>
|
||||
where TEntity : class {
|
||||
TEntity Get(TKey id);
|
||||
|
||||
Task<TEntity> GetAsync(TKey id);
|
||||
|
||||
TEntity Find(TKey id);
|
||||
|
||||
Task<TEntity> FindAsync(TKey id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user