I still haven't tried that!

With lentils it depends on the recipe. Some recipes need pre cooked lentils because of the cooking time. If I was substituting I'd cook the lentils similar to how they are canned. Or ensure there was enough cooking time without over cooking the other ingredients. When you cook lentils in a dish they tend to break down slightly. The texture also changes depending on how much salt is in the dish.