using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Sevomin.Models.Repositories
|
|
{
|
|
public interface IRepository<K, T>
|
|
{
|
|
void Add(T entity);
|
|
T Find(K identifier);
|
|
void Delete(T entity);
|
|
void Save();
|
|
}
|
|
|
|
public interface IUserRepository : IRepository<string, User>
|
|
{
|
|
User FindWithConfirmationCode(string code);
|
|
IQueryable<User> ListAll();
|
|
}
|
|
|
|
public interface IJobRepository : IRepository<long ,Job>
|
|
{
|
|
Job GetEmptyJobFor(Avalin avalin);
|
|
IQueryable<Job> ListAll();
|
|
DovominJob Apply(Dovomin dovomin, Job job, string coverLetter);
|
|
}
|
|
|
|
public interface IParameterRepository : IRepository<long, Parameter>
|
|
{
|
|
IQueryable<Parameter> ListAll();
|
|
void AddParametersToDovomin(Dovomin dovomin);
|
|
}
|
|
|
|
public interface IAdRepository : IRepository<long, Ad>
|
|
{
|
|
void ChangeDays(long id, int duration);
|
|
void ToggleActive(long id);
|
|
IQueryable<Ad> ListAll();
|
|
IEnumerable<Ad> GetAds();
|
|
}
|
|
}
|