/// <summary> /// Gets the roles. /// </summary> /// <param name="request">The request.</param> /// <returns></returns> public RoleResponse GetRoles(RoleRequest request) { var response = new RoleResponse(); if (request.LoadOptions.Contains("Roles")) { response.Roles = request.LoadOptions.Contains("Active") ? RoleDao.GetRoles(request.IsActive) : RoleDao.GetRoles(); } if (request.LoadOptions.Contains("Role")) { response.Role = RoleDao.GetRole(request.RoleId); if (request.LoadOptions.Contains("RoleSite")) { response.Role.RoleSiteEntities = RoleSiteDao.GetRoleSiteByRoleId(request.RoleId); } } return(response); }