예제 #1
0
        public void UpdateMap(Map map)
        {
            AzureBlobStorageHelper.UploadMapThumbnail(map.Id.ToString(), MapThumbnailDrawer.Draw(map));

            this.DbContext.Maps.Attach(map);
            this.DbContext.Entry(map).State = EntityState.Modified;

            this.DbContext.SaveChanges();
        }
예제 #2
0
        public void CreateMap(Map map, bool isLocked = false)
        {
            AzureBlobStorageHelper.UploadMapThumbnail(map.Id.ToString(), MapThumbnailDrawer.Draw(map));

            map.IsLocked = isLocked;

            this.DbContext.Maps.Add(map);
            this.DbContext.SaveChanges();
        }