IDaoRepository.cs 838 B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using Quadarax.Foundation.Core.Data.Interface.Entity;
  5. namespace Quadarax.Foundation.Core.Data.Interface.Repository
  6. {
  7. public interface IDaoRepository<TKey, TDao> : IRepository where TDao : IDao<TKey> where TKey : IEquatable<TKey>
  8. {
  9. public IQueryable<TDao> Query(IPaging paging, bool usingUncomited = false);
  10. public TDao Get(TKey id);
  11. public IQueryable<TDao> Get(IEnumerable<TKey> ids);
  12. public TDao Set(TDao entity);
  13. public IEnumerable<TDao> Set(IEnumerable<TDao> entities);
  14. public TDao New();
  15. public bool Remove(TKey id);
  16. public IEnumerable<bool> Remove(IEnumerable<TKey> ids);
  17. public bool Remove(TDao entity);
  18. public IEnumerable<bool> Remove(IEnumerable<TDao> entities);
  19. }
  20. }