public BankOperationHistory CreateBankOperationHistoryRecord(BankOperationHistory record, AdministrationAccessLevel accessLevel = AdministrationAccessLevel.ReadOnlyAccessToSystem) { if (accessLevel == AdministrationAccessLevel.FullAccessToSystem) { if (db.Banks.Any()) { var bank = db.Banks.First(); AddBankHistoryRecord(bank, record, AdministrationAccessLevel.FullAccessToSystem); } } return(record); }
public void AddBankHistoryRecord(Bank bank, BankOperationHistory record, AdministrationAccessLevel accessLevel = AdministrationAccessLevel.ReadOnlyAccessToSystem) { db.Banks.Find(bank).BankOperationsHistory.Add(record); db.SaveChanges(); }