示例#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);
 }