public Instrument Create(Guid id, string manufacturer, string modelNo, string range, string description, int allocatedCalibrationTime) { if (id == Guid.Empty) { throw new ArgumentException("An ID must be supplied for the instrument"); } var instrument = new Instrument(); instrument.Id = id; instrument.Manufacturer = manufacturer; instrument.ModelNo = modelNo; instrument.Range = range; instrument.Description = description; instrument.AllocatedCalibrationTime = GetAllocatedCalibrationTime(allocatedCalibrationTime); ValidateAnnotatedObjectThrowOnFailure(instrument); _instrumentRepository.Create(instrument); return(instrument); }
public void Create(Instrument Instrument) { _InstrumentRepository.Create(Instrument); }