public async Task EditSticker(StickerWithGroup stickerModel)
        {
            if (stickerModel.Model.Content == null && stickerModel.Model.Url == null)
            {
                return;
            }
            var sticker = _context.GetSingle(x => stickerModel.Model.Id == x.Id);


            sticker.X       = stickerModel.Model.X;
            sticker.Y       = stickerModel.Model.Y;
            sticker.Width   = stickerModel.Model.Width;
            sticker.Height  = stickerModel.Model.Height;
            sticker.Color   = stickerModel.Model.Color;
            sticker.Content = stickerModel.Model.Content;
            sticker.Url     = stickerModel.Model.Url;

            _context.Update(sticker);
            _context.Commit();
            await Clients.Group(stickerModel.Group).SendAsync("EditStickerSuccess", _context.GetAll());
        }
Exemple #2
0
 public void UpdateSticker(Sticker Sticker)
 {
     _stickerRepository.Update(Sticker);
     SaveSticker();
 }