// Returns the environment permissions for a given user public UserEnvironmentPermissions ToUserEnvironmentPermissions(string objectId) { return(new UserEnvironmentPermissions { EnvironmentResourceGroup = EnvironmentResourceGroup.Where(p => p.ObjectId == objectId).ToList(), Batch = Batch.Where(p => p.ObjectId == objectId).ToList(), Storage = Storage.Where(p => p.ObjectId == objectId).ToList(), KeyVault = KeyVault.Where(p => p.ObjectId == objectId).ToList(), ApplicationInsights = ApplicationInsights.Where(p => p.ObjectId == objectId).ToList(), VNet = VNet.Where(p => p.ObjectId == objectId).ToList(), }); }