public async Task DeleteSourceArchitecture(object arch)
        {
            var architecture = arch as ArchitectureModel;
            var source       = await _sourcesManager.GetSourceById(_source.Id);

            if (architecture == null)
            {
                return;
            }

            var ArchSour = new ArchitectureSourceModel
            {
                ArchitectureId = architecture.Id,
                SourceId       = source.Id
            };

            await _architectureSourceManager.RemoveArchitectureSource(architecture.Id, source.Id);

            source.ArchitecturesSources.Remove(ArchSour);

            await _sourcesManager.UpdateSource(source);

            Architectures.Remove(architecture);

            ArchitecturesList.Add(architecture);
        }
        private async Task AddSourceArchitecture()
        {
            var source = await _sourcesManager.GetSourceById(_source.Id);

            if (source.ArchitecturesSources == null)
            {
                source.ArchitecturesSources = new List <ArchitectureSourceModel>();
            }

            source.ArchitecturesSources.Add(
                new ArchitectureSourceModel
            {
                ArchitectureId = Architecture.Id,
                SourceId       = source.Id
            });

            var architecture = await _architecturesManager.GetArchitectureById(Architecture.Id);

            if (architecture == null)
            {
                return;
            }

            await _sourcesManager.UpdateSource(source);

            Architectures.Add(architecture);

            ArchitecturesList.Remove(architecture);
        }
 public ObservableCollection <ArchitectureModel> SuggestBox_TextChanged(string text)
 {
     return(new ObservableCollection <ArchitectureModel>(
                ArchitecturesList.Where(i => i.Title.ToLower().Contains(text))));
 }