IMainRepository.cs 669 Bytes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NHibernate;
using NHibernate.Cfg;

namespace ControlPanel.Interfaces.Reposytorys
{
    public interface IMainRepository<T>
    {
        IList<T> GetAll();
        T GetByMaxId();
        T GetByID(int id);
        void Save(T obj);
        void Delete(T obj);
        void SaveUpdate(T obj);
        void DeleteByID(string idPropertyName, int objId);
        IList<T> GetByPropertyName(string idPropertyName, string pvalue);

    }


    public interface INHBRepository
    {
        ISessionFactory CreateSessionFactory();
        
    }

}