public Response <UserGroups> UpdateUserGroups(UserGroups userGroups) { try { var data = _userGroupRepository.UpdateUserGroups(userGroups); if (data != null && data.Any()) { return(new Response <UserGroups>(true, "Success", data[0])); } return(new Response <UserGroups>(false, "Fail", null)); } catch (Exception e) { _logger.Error($"UpdateUserGroups Failed: {e.Message}\n {e.StackTrace}"); return(new Response <UserGroups>(false, e.Message, null)); } }