public static CharacterEditViewModel FromCharacter(Character character) { var model = new CharacterEditViewModel { Id = character.Id, Name = character.Name, GameId = character.GameId, ApiKeyId = character.ApiKeyId, ApiKey = character.ApiKey }; return model; }
public Character ToCharacter() { var character = new Character() { Id = this.Id, UserId = this.UserId, Name = this.Name, GameId = this.GameId, ApiKey = this.ApiKey, ApiKeyId = this.ApiKeyId }; return character; }