public void AddPlatform(Platform platform) { CheckDbState(); using (Database.Engine.Locker.Reserved()) { PlatformsCollection.Insert(platform); } OnPlatformsCollectionChanged(new List <Platform>() { platform }, new List <Platform>()); }
public void AddPlatform(Platform platform) { CheckDbState(); lock (fileLock) { PlatformsCollection.Insert(platform); } OnPlatformsCollectionChanged(new List <Platform>() { platform }, new List <Platform>()); }
public void AddPlatform(IEnumerable <Platform> platforms) { CheckDbState(); if (platforms == null || platforms.Count() == 0) { return; } lock (fileLock) { foreach (var platform in platforms) { PlatformsCollection.Insert(platform); } } OnPlatformsCollectionChanged(platforms.ToList(), new List <Platform>()); }