Exemplo n.º 1
0
        private static string GetSelectedTypeId()
        {
            var isValidType    = false;
            var selectedTypeId = string.Empty;

            while (!isValidType)
            {
                PrintTypes();
                selectedTypeId = Console.ReadLine();
                var allTypes = TextType.GetAll <TextType>();
                isValidType = allTypes.Select(x => x.Id).Contains(selectedTypeId);
            }

            return(selectedTypeId);
        }