DeviceFaultRepository.cs 642 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace GDNXFD.Data
  7. {
  8. public class DeviceFaultRepository
  9. {
  10. public static IList<DeviceFault> GetDeviceFault()
  11. {
  12. IList<DeviceFault> list = new List<DeviceFault>();
  13. try
  14. {
  15. using (GDNXFDDbContext ctx = new GDNXFDDbContext())
  16. {
  17. list = ctx.DeviceFault.Select(s=>s).ToList();
  18. }
  19. }
  20. catch (Exception ex)
  21. {
  22. }
  23. return list;
  24. }
  25. }
  26. }