예제 #1
0
        private void SaveItem(SampleItemDto dto)
        {
            var oldDto = _itemsStorage.SingleOrDefault(x => x.Id == dto.Id);

            if (oldDto == null)
            {
                _itemsStorage.Add(dto);
                return;
            }

            oldDto.DisplayName = dto.DisplayName;
            oldDto.Value       = dto.Value;
        }
예제 #2
0
 public bool UpdateItem(SampleItemDto dto)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public void CreateItem(SampleItemDto dto)
 {
     throw new NotImplementedException();
 }
예제 #4
0
 void ISampleDataProvider.CreateItem(SampleItemDto dto) => GetService(r =>
 {
     Task.Delay(_random.Next(2000)).Wait();
     return(r);
 }).CreateItem(dto);