I have the following SQL Query and I have tried to convert it to LINQ but without any success:
select
at.financialaccountid,
SUM(creditamount)-SUM(debitamount)
from account_transactions at
where at.financialaccountid = 47
and ledgervisible = 1
GROUP BY at.financialaccountid

Hope someone can guide me on this.
Thanks.
The following should be a comparable C# LINQ implementation: