1234567891011121314151617181920212223242526272829303132 |
- using Sugar.Enties;
- using SqlSugar;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- /// <summary>
- /// 数据字典主表子表功能
- /// </summary>
- public class DictionaryNameManager : DbContext<DictionaryName>
- {
- //当前类已经继承了 DbContext增、删、查、改的方法
- //这里面写的代码不会给覆盖,如果要重新生成请删除 DictionaryNameManager.cs
- public DictionaryName GetDictionaryName(string name)
- {
- var entity = DictionaryNameDb.GetList(m => m.dnNAME == name).FirstOrDefault();
- return entity;
- }
- public List<DictionaryItem> GetDictionaryItems(string dncode)
- {
- return DictionaryItemDb.GetList(mbox => mbox.dnCode == dncode);
- }
- }
|