public int Save(List <RoleDetail> listObj)
        {
            var result = 0;

            using (IDapperContext context = new DapperContext())
            {
                _repository = new RoleDetailRepository(context);
                result      = _repository.Save(listObj);
            }

            return(result);
        }
        public IList <string> GetAllMenuNameByTagAction(string roleKode, string formAction)
        {
            IList <string> listObj = null;

            using (IDapperContext context = new DapperContext())
            {
                _repository = new RoleDetailRepository(context);
                listObj     = _repository.GetAllMenuNameByTagAction(roleKode, formAction);
            }

            return(listObj);
        }
        public IList <RoleDetail> GetAllByRoleKode(string roleKode)
        {
            IList <RoleDetail> listObj = null;

            using (IDapperContext context = new DapperContext())
            {
                _repository = new RoleDetailRepository(context);
                listObj     = _repository.GetAllByRoleKode(roleKode);
            }

            return(listObj);
        }
        public IList <RoleDetail> GetByMenuParent(string roleKode, string menuParent)
        {
            IList <RoleDetail> listObj = null;

            using (IDapperContext context = new DapperContext())
            {
                _repository = new RoleDetailRepository(context);
                listObj     = _repository.GetByMenuParent(roleKode, menuParent);
            }

            return(listObj);
        }
        public int DeleteAll()
        {
            var result = 0;

            using (IDapperContext context = new DapperContext())
            {
                _repository = new RoleDetailRepository(context);
                result      = _repository.DeleteAll();
            }

            return(result);
        }