12345678910111213141516171819202122232425 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using MySystem.MainModels;
- namespace MySystem
- {
- public class OrdersDbconn
- {
- public readonly static OrdersDbconn Instance = new OrdersDbconn();
- #region 获取单个字段
- public Orders Get(int Id)
- {
- WebCMSEntities db = new WebCMSEntities();
- Orders order = db.Orders.FirstOrDefault(m => m.Id == Id);
- if (order != null)
- {
- }
- db.Dispose();
- return order;
- }
- #endregion
- }
- }
|