I assume you know how to add links to a diagram at all – through adding link relationship information to the model.
So you just need to make sure that the go:Link.LayerName == “TempLinkLayer”. Typically that attached property is either set or data bound in the DataTemplate on the root FrameworkElement.
Do you need to change the layer that a Link is in dynamically? If so, then it might make sense to add a LayerName property to your MyLinkData class and bind go:Part.LayerName to that property.
But if not, then I would not bother with a new property and binding, but just set go:Part.LayerName=“TempLinkLayer” in the DataTemplate.