Files
Backend-Api/0_Framework/Domain/IRepository.cs
2025-08-09 14:45:04 +03:30

23 lines
623 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();
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();
}