11 lines
		
	
	
		
			309 B
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			309 B
		
	
	
	
		
			C#
		
	
	
| using System.Linq.Expressions;
 | |
| 
 | |
| namespace Tiger.Storage;
 | |
| 
 | |
| public interface IRepository<T>
 | |
| {
 | |
|     Task<T?> FindAsync(object id);
 | |
|     Task SaveAsync(T entity);
 | |
|     Task<IEnumerable<T>> FindByAsync(Expression<Func<T, bool>>? expression = null);
 | |
|     Task<T?> FindOneByAsync(Expression<Func<T, bool>> expression);
 | |
| } |