public void DeleteHardwareIdentificationLevel1(string hardwareIdentificationLevel1Name) { EntityFramework.HardwareIdentificationLevel1 hardwareIdentificationLevel1 = databaseContext.HardwareIdentificationLevel1.Where(x => x.Name == hardwareIdentificationLevel1Name).FirstOrDefault(); if (hardwareIdentificationLevel1 != null) { databaseContext.HardwareIdentificationLevel1.Remove(hardwareIdentificationLevel1); databaseContext.SaveChanges(); } }
public void EditHardwareIdentificationLevelel1(string hardwareIdentificationLevel1Name, string oldHardwareIdentificationLevel1Name) { EntityFramework.HardwareIdentificationLevel1 hardwareIdentificationLevel1ToUpdate = databaseContext.HardwareIdentificationLevel1.Where(x => x.Name == oldHardwareIdentificationLevel1Name).FirstOrDefault(); if (hardwareIdentificationLevel1ToUpdate != null) { hardwareIdentificationLevel1ToUpdate.Name = hardwareIdentificationLevel1Name; } databaseContext.SaveChanges(); }