public void SetStructureCount(int structureTypeID, int count) { var entry = CelestialObjectStructures.SingleOrDefault(x => x.StructureTypeID == structureTypeID); if (entry == null) { entry = new CelestialObjectStructure(); entry.StructureTypeID = structureTypeID; CelestialObjectStructures.Add(entry); } entry.Count = count; if (count == 0) CelestialObjectStructures.Remove(entry); }
public void SetStructureCount(int structureTypeID, int count) { var entry = CelestialObjectStructures.SingleOrDefault(x => x.StructureTypeID == structureTypeID); if (entry == null) { entry = new CelestialObjectStructure(); entry.StructureTypeID = structureTypeID; CelestialObjectStructures.Add(entry); } entry.Count = count; if (count == 0) { CelestialObjectStructures.Remove(entry); } }
private void detach_CelestialObjectStructures(CelestialObjectStructure entity) { this.SendPropertyChanging(); entity.StructureType = null; }
partial void DeleteCelestialObjectStructure(CelestialObjectStructure instance);
partial void InsertCelestialObjectStructure(CelestialObjectStructure instance);
private void attach_CelestialObjectStructures(CelestialObjectStructure entity) { this.SendPropertyChanging(); entity.CelestialObject = this; }