mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-29 18:21:08 +00:00
25 lines
619 B
C#
25 lines
619 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using CleanArchitecture.Domain.Entities;
|
|
|
|
namespace CleanArchitecture.Domain.Interfaces.Repositories;
|
|
|
|
public interface IRepository<TEntity> : IDisposable where TEntity : Entity
|
|
{
|
|
void Add(TEntity entity);
|
|
|
|
void AddRange(IEnumerable<TEntity> entities);
|
|
|
|
IQueryable<TEntity> GetAll();
|
|
|
|
IQueryable<TEntity> GetAllNoTracking();
|
|
|
|
Task<TEntity?> GetByIdAsync(Guid id);
|
|
|
|
void Update(TEntity entity);
|
|
|
|
Task<bool> ExistsAsync(Guid id);
|
|
public void Remove(TEntity entity, bool hardDelete = false);
|
|
} |