﻿namespace Yamd.WebService.Repository.Abstract
{
    using Entity;
    using System;
    using System.Linq;
    using System.Linq.Expressions;

    public interface IRepository<T>
        where T : IdentifiableEntity
    {
        void Add(T entity);

        void Delete(T entity);

        void Edit(T entity);

        IQueryable<T> FindBy(Expression<Func<T, bool>> predicate);

        IQueryable<T> GetAll();

        T GetByKey(long id);

        T GetFirst();

        void Save();
    }
}