using System;
using System.Collections.Generic;
using System.Linq;
using MySystem.MainModels;

namespace MySystem
{
    public class PosMachinesTwoDbconn
    {
        public readonly static PosMachinesTwoDbconn Instance = new PosMachinesTwoDbconn();

        #region 获取单个字段
        public PosMachinesTwo Get(int Id)
        {
            WebCMSEntities db = new WebCMSEntities();
            PosMachinesTwo order = db.PosMachinesTwo.FirstOrDefault(m => m.Id == Id);
            if (order != null)
            {
                // RedisDbconn.Instance.Set(key, order);
                // RedisDbconn.Instance.SetExpire(key, Library.function.get_Random(1800, 5400));
            }
            db.Dispose();
            return order;
        }
        public PosMachinesTwo Get(string PosSn)
        {
            WebCMSEntities db = new WebCMSEntities();
            PosMachinesTwo order = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn);
            if (order != null)
            {
            }
            return order;
        }
        
        #endregion
    }
}