IRepository.cs 350 B

1234567891011121314151617181920
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace MqttMsgServer.Dao
  7. {
  8. public interface IRepository<TPrimaryKey, T>
  9. {
  10. IEnumerable<T> GetAll();
  11. T GetById(TPrimaryKey id);
  12. T Add(T t);
  13. T Update(T t);
  14. T Delete(T t);
  15. }
  16. }