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(); }
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(); }