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