public COMPTA_CustomerJournalLine CreateCustomerJournalLine(COMPTA_CustomerJournalLine customerJournalLineToAdd) { using (SUPERPEntities context = new SUPERPEntities(false)) { var customerJournalLine = context.COMPTA_CustomerJournalLine.Add(customerJournalLineToAdd); context.SaveChanges(); return(customerJournalLine); } }
public COMPTA_CustomerJournalLine EditCustomerJournalLine(COMPTA_CustomerJournalLine customerJournalLineToEdit) { using (SUPERPEntities context = new SUPERPEntities(false)) { var customerJournalLine = context.COMPTA_CustomerJournalLine.Find(customerJournalLineToEdit.id); if (customerJournalLine == null) { return(null); } customerJournalLine = customerJournalLineToEdit; context.SaveChanges(); return(customerJournalLine); } }