private void SaveItem(SampleModelDto dto) { var oldDto = _itemsStorage.SingleOrDefault(x => x.Id == dto.Id); if (oldDto == null) { _itemsStorage.Add(dto); } }
public void CreateItem(SampleModelDto dto) { throw new NotImplementedException(); }
void ISampleModelDataProvider.CreateItem(SampleModelDto dto) => GetService(r => { Task.Delay(_random.Next(2000)).Wait(); return(r); }).CreateItem(dto);
public bool UpdateItem(SampleModelDto dto) { throw new NotImplementedException(); }