public Response <UserGroups> InsertUserGroups(UserGroups userGroups) { try { var data = _userGroupRepository.InsertUserGroups(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($"InsertUserGroups Failed: {e.Message}\n {e.StackTrace}"); return(new Response <UserGroups>(false, e.Message, null)); } }