You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. namespace Sevomin.Models.Repositories
  4. {
  5. public interface IRepository<K, T>
  6. {
  7. void Add(T entity);
  8. T Find(K identifier);
  9. void Delete(T entity);
  10. void Save();
  11. }
  12. public interface IUserRepository : IRepository<string, User>
  13. {
  14. User FindWithConfirmationCode(string code);
  15. IQueryable<User> ListAll();
  16. }
  17. public interface IJobRepository : IRepository<long ,Job>
  18. {
  19. Job GetEmptyJobFor(Avalin avalin);
  20. IQueryable<Job> ListAll();
  21. DovominJob Apply(Dovomin dovomin, Job job, string coverLetter);
  22. }
  23. public interface IParameterRepository : IRepository<long, Parameter>
  24. {
  25. IQueryable<Parameter> ListAll();
  26. void AddParametersToDovomin(Dovomin dovomin);
  27. }
  28. public interface IAdRepository : IRepository<long, Ad>
  29. {
  30. void ChangeDays(long id, int duration);
  31. void ToggleActive(long id);
  32. IQueryable<Ad> ListAll();
  33. IEnumerable<Ad> GetAds();
  34. }
  35. }