Exemple #1
0
        public NamedRecordSet GetOrCreateVehicleRecord(string vehicleName)
        {
            var vehicleRecord = VehicleRecords.FirstOrDefault(x => x.Name == vehicleName);

            if (vehicleRecord == null)
            {
                vehicleRecord = new NamedRecordSet()
                {
                    Name = vehicleName,
                };
                VehicleRecords.Add(vehicleRecord);
            }

            return(vehicleRecord);
        }
Exemple #2
0
        public NamedRecordSet GetOrCreateClassRecord(string className)
        {
            var classRecord = ClassRecords.FirstOrDefault(x => x.Name == className);

            if (classRecord == null)
            {
                classRecord = new NamedRecordSet()
                {
                    Name = className,
                };
                ClassRecords.Add(classRecord);
            }

            return(classRecord);
        }