private void InsertForegroundProcessInfo(Process p) { // create entity item, add, and update repository. var processInfo = new ForegroundProcessInfoEntity(); processInfo.Initialize(p); _foregroundInfoRepository.AddItem(processInfo); _foregroundInfoRepository.SaveChanges(); }
public void UpdateItem(ForegroundProcessInfoEntity entity) { var index = _items.FindIndex(x => { return(x.Id.Equals(entity.Id)); }); if (index >= 0) { _items[index] = entity; } }
public void AddItem(ForegroundProcessInfoEntity entity) { _items.Add(entity); }