Пример #1
0
        public Task UpdateInstitute(DomainObjects.MoscowInstitute MInstitute)
        {
            var foundinstitute = GetInstitute(MInstitute.Id).Result;

            if (foundinstitute == null)
            {
                AddInstitute(MInstitute);
            }
            else
            {
                if (foundinstitute != MInstitute)
                {
                    _MInstitutes.Remove(foundinstitute);
                    _MInstitutes.Add(MInstitute);
                }
            }
            return(Task.CompletedTask);
        }
Пример #2
0
 public Task RemoveInstitute(DomainObjects.MoscowInstitute MInstitute)
 {
     _MInstitutes.Remove(MInstitute);
     return(Task.CompletedTask);
 }
Пример #3
0
 public Task AddInstitute(DomainObjects.MoscowInstitute MInstitute)
 {
     _MInstitutes.Add(MInstitute);
     return(Task.CompletedTask);
 }