private async Task AddArchitect()
        {
            var architect = new ArchitectModel(
                Name, Surname, Nationality, BirthYear, DeathYear);

            await _architectsManager.AddArchitect(architect);

            _customNavigationService.NavigateTo(PageKeys.ArchitectMain);
        }
Ejemplo n.º 2
0
        private static async Task FillArchitects()
        {
            IList <Architect> architects = (await _architectsManager.GetArchitects()).ToList();

            if (architects != null && architects.Any())
            {
                return;
            }

            await _architectsManager.AddArchitect(
                new Architect("Джон", "Петров", "Ukraine", DateTime.Now.AddYears(-50).Year, DateTime.Now.Year));

            await _architectsManager.AddArchitect(
                new Architect("Андрей", "Столовый", "Russia", DateTime.Now.AddYears(-30).Year, DateTime.Now.Year));

            await _architectsManager.AddArchitect(
                new Architect("Кирилл", "Справочный", "Ukraine", DateTime.Now.AddYears(-50).Year, DateTime.Now.Year));

            await _architectsManager.AddArchitect(
                new Architect("Никита", "Цыбусов", "Ukraine", DateTime.Now.AddYears(-50).Year, DateTime.Now.Year));
        }