public COMPTA_BankJournalLine CreateBankJournalLine(COMPTA_BankJournalLine bankJournalLineToAdd) { using(SUPERPEntities context = new SUPERPEntities(false)) { var bankJournalLine = context.COMPTA_BankJournalLine.Add(bankJournalLineToAdd); context.SaveChanges(); return bankJournalLine; } }
public COMPTA_BankJournalLine EditBankJournalLine(COMPTA_BankJournalLine bankJournalLineToEdit) { using(SUPERPEntities context = new SUPERPEntities(false)) { var bankJournalLine = context.COMPTA_BankJournalLine.Find(bankJournalLineToEdit.id); if (bankJournalLine == null) return null; bankJournalLine = bankJournalLineToEdit; context.SaveChanges(); return bankJournalLine; } }