public ApplicationGroup Delete(int id)
        {
            var appGroup = _appGroupRepository.GetSingleById(id);

            //xoá các roles thuộc group
            _appRoleGroupRepository.DeleteMulti(s => s.GroupId == id);
            //xoá các user thuộc group
            _appUserGroupRepository.DeleteMulti(s => s.GroupId == id);
            return(_appGroupRepository.Delete(appGroup));
        }
Esempio n. 2
0
 public ApplicationGroup GetDetail(int id)
 {
     return(_appGroupRepository.GetSingleById(id));
 }
        public ApplicationGroup Delete(int id)
        {
            var appGroup = _appGroupRepository.GetSingleById(id);

            return(_appGroupRepository.Delete(appGroup));
        }
 public async Task <ApplicationGroup> GetDetail(int id)
 {
     return(await Task.FromResult(_appGroupRepository.GetSingleById(id)));
 }
Esempio n. 5
0
        public ApplicationGroup FindById(int id)
        {
            var appGroup = _appGroupRepository.GetSingleById(id);

            return(appGroup);
        }