24 lines
672 B
C#
24 lines
672 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
namespace _0_Framework.Domain;
|
|
|
|
public interface IRepository<TKey, T> where T:class
|
|
{
|
|
T Get(TKey id);
|
|
List<T> Get();
|
|
Task<List<T>> GetListByIdList(List<TKey> ids);
|
|
void Create(T entity);
|
|
Task CreateAsync(T entity);
|
|
bool ExistsIgnoreQueryFilter(Expression<Func<T, bool>> expression);
|
|
bool Exists(Expression<Func<T, bool>> expression);
|
|
void SaveChanges();
|
|
Task SaveChangesAsync();
|
|
Task<IDbContextTransaction> BeginTransactionAsync();
|
|
|
|
} |