Files
Backend-Api/0_Framework/Domain/IRepository.cs
2025-03-04 21:40:02 +03:30

20 lines
519 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
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();
}