using iWareCommon.Common.Dao; using iWareDataCore.ORM; using iWareDataCore.RBAC.Entity; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iWareDataCore.RBAC.Dao { public class RoleUserDao : CommonDao { private static object Lock = new object(); private RoleUserDao() { } private static RoleUserDao Instance = null; /// /// 获取单例的方法 /// /// 角色-用户服务的单例实体 public static RoleUserDao GetInstance() { if (Instance == null) { lock (Lock) { if (Instance == null) { Instance = new RoleUserDao(); } } } return Instance; } protected override string GetColumnName(string name) { return RoleUserEntity.GetColumnName(name); } protected override string GetTableName() { return RoleUserEntity.GetTableName(); } protected override RoleUserEntity ToEntity(RBACRoleUser s) { return new RoleUserEntity(s); } protected override RBACRoleUser ToOrm(RoleUserEntity t) { return t.ToOrm(); } protected override List GetColumnNames() { return RoleUserEntity.GetColumnMap().Keys.ToList(); } } }