How do I create a Ledger Entry? I'm using C#

I'm at a loss here guys.  The documentation sucks, I feel like I'm on an island, and I'm way behind in my project.  Hoping there might be someone, anyone that might have a clue as to how to create a ledger entry and relate it back to an invoice.