public string AddMachine(MachineDetail machineDetail) { machineDetail.ID = (++machineId).ToString(); MachineDetails.Add(machineDetail); return(string.Format("add successfully {0}", machineDetail.Name)); }
public string GetMachineNameById(string machineId) { MachineDetail machineDetail = MachineDetails.Find(x => x.ID == machineId); return(machineDetail.Name); }
public string AddMachine(MachineDetail machineDetail) { machineDetail.ID = (++machineId).ToString(); MachineDetails.Add(machineDetail); return (string.Format("add successfully {0}",machineDetail.Name)); }