public void UpdateCharacter(EntitiesLayer.Character ch) { DataAccessLayer.ThronesTournamentEntities bdd = new ThronesTournamentEntities(); Character objEntity = bdd.Characters.FirstOrDefault(c => c.Id == ch.ID); objEntity.lastName = ch.LastName; objEntity.firstName = ch.FirstName; objEntity.pv = ch.PV; objEntity.bravoury = ch.Bravoury; objEntity.crazyness = ch.Crazyness; bdd.SaveChanges(); }
public void AddCharacter(EntitiesLayer.Character character) { DataAccessLayer.ThronesTournamentEntities bdd = new ThronesTournamentEntities(); var newChar = new Character(); newChar.lastName = character.LastName; newChar.firstName = character.FirstName; newChar.bravoury = character.Bravoury; newChar.crazyness = character.Crazyness; newChar.house_char = character.ID_House; newChar.pv = character.PV; bdd.Characters.Add(newChar); bdd.SaveChanges(); }
private EntitiesLayer.Character ConvertToCharacter(Character element) { EntitiesLayer.Character c = new EntitiesLayer.Character(); if (element != null) { c.ID = element.Id; c.Bravoury = element.bravoury; c.Crazyness = element.crazyness; c.FirstName = element.firstName; c.LastName = element.lastName; c.ID_House = (int)element.house_char; c.PV = element.pv; } else { c = null; } return(c); }
public EntitiesLayer.Character MajCharacter(EntitiesLayer.Character ch) { throw new System.NotImplementedException(); }
private EntitiesLayer.Character GetCharacter(DataAccessLayer.Characters chr) { EntitiesLayer.Character ch = new EntitiesLayer.Character(chr.firstname, chr.lastname, chr.pv.Value, chr.bravoury.Value, chr.crazyness.Value); return(ch); }
public void AddRelation(Character Character, RelationType Relation) { Relations.Add(new Relation(Character, Relation)); }
public void AddCharacter(EntitiesLayer.Character character) { DataAccessLayer.DALManager manager = DataAccessLayer.DALManager.Instance; manager.DALServer.AddCharacter(character); }
public Territory(TerritoryType TerritoryType, Character Owner) { this.TerritoryType = TerritoryType; this.Owner = Owner; }