UserMachineDataDbconn.cs 706 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using Library;
  4. using System.Linq;
  5. using MySystem.MainModels;
  6. namespace MySystem
  7. {
  8. public class UserMachineDataDbconn
  9. {
  10. public readonly static UserMachineDataDbconn Instance = new UserMachineDataDbconn();
  11. #region 获取单个字段
  12. public UserMachineData Get(string IdBrand)
  13. {
  14. WebCMSEntities db = new WebCMSEntities();
  15. UserMachineData userData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == IdBrand);
  16. if (userData != null)
  17. {
  18. }
  19. db.Dispose();
  20. return userData;
  21. }
  22. #endregion
  23. }
  24. }