Example #1
0
        public new int Update(Model.ManagerRole entity)
        {
            var count = Db.Update(entity);

            UpdateCacheManagerRoleList();
            return(count);
        }
Example #2
0
        public new int Insert(Model.ManagerRole T)
        {
            var count = Db.Insert(T);

            UpdateCacheManagerRoleList();
            return(count);
        }
Example #3
0
        public new int Delete(Model.ManagerRole entity)
        {
            int count;

            using (DbTrans trans = Db.BeginTransaction())
            {
                count = Db.Delete(trans, entity);
                Db.Delete <Model.ManagerRoleValue>(trans, p => p.RoleId == entity.Id);
                Db.Delete <Model.NavigationRoleValue>(trans, p => p.RoleId == entity.Id);
                trans.Commit();
            }
            UpdateCacheManagerRoleList();
            return(count);
        }