i have two dropdowns and amount in my page
1.Account
2.ContraAccount
3.Amount
when i save this details i want to insert in database like,
Amount should debit from Account(1 row),and amount should credit in another account(2nd row)
Account ContrAccoutn Debit Credit
Cash A 100 0
A Cash 0 100
my controller code
var Ledger = db.LedgerTables.Create();
Ledger.AccountID = strddlAccount;
Ledger.ContraAccountID = strddlCustomer;
Ledger.Debit = transactionGInfo.Amount;
db.LedgerTables.Add(Ledger);
db.SaveChanges();