public void UpdateItem(SystemDictionaryType type, SystemDictionaryItem item) { updateItem(type, item); _datasCache.Save(type, (dictionaryItem) => { dictionaryItem[item.Id].Name = item.Name; dictionaryItem[item.Id].Value = item.Value; dictionaryItem[item.Id].Remark = item.Remark; return(true); }); }
public void AddItem(SystemDictionaryType type, SystemDictionaryItem item) { insertItem(type, item); _datasCache.Save(type, () => { var data = new SystemDictionary(type); data.AddItem(item); return(data); }, (dictionaryItem) => { dictionaryItem.AddItem(item); return(true); }); }
void updateItem(SystemDictionaryType type, SystemDictionaryItem item) { var repository = getRepository(); repository.UpdateItem(type, item); }
void insertItem(SystemDictionaryType type, SystemDictionaryItem item) { var repository = getRepository(); repository.InsertItem(type, item); }
internal void AddItem(SystemDictionaryItem item) { _itemsCache.Add(item.Id, item); }