public void UpdateTerritoryType(EntitiesLayer.TerritoryType territoryType) { DataAccessLayer.ThronesTournamentEntities bdd = new ThronesTournamentEntities(); Territory_Type objEntity = bdd.TerritoriesTypes.FirstOrDefault(t => t.Id == territoryType.ID); objEntity.type = territoryType.Type; bdd.SaveChanges(); }
public void AddTerritoryType(EntitiesLayer.TerritoryType territoryType) { DataAccessLayer.ThronesTournamentEntities bdd = new ThronesTournamentEntities(); var newTerritoryType = new Territory_Type(); newTerritoryType.type = territoryType.Type; bdd.TerritoriesTypes.Add(newTerritoryType); bdd.SaveChanges(); }
private EntitiesLayer.TerritoryType ConvertToTerritoryType(Territory_Type element) { EntitiesLayer.TerritoryType territoryType = new EntitiesLayer.TerritoryType(); if (element != null) { territoryType.ID = element.Id; territoryType.Type = element.type; } else { territoryType = null; } return(territoryType); }
public void UpdateTerritoryType(EntitiesLayer.TerritoryType territoryType) { DataAccessLayer.DALManager manager = DataAccessLayer.DALManager.Instance; manager.DALServer.UpdateTerritoryType(territoryType); }
public Territory(TerritoryType TerritoryType) { this.TerritoryType = TerritoryType; Owner = null; }
public Territory() { TerritoryType = new TerritoryType(TerritoryTypeEnum.DESERT); Owner = null; }