Exemplo n.º 1
0
        public async Task <CharacterCommandTile> Update(CharacterCommandTile item)
        {
            var ctile = await _repo.Get((int)item.CommandTileId);

            if (ctile == null)
            {
                return(ctile);
            }

            ctile.Command          = item.Command;
            ctile.Title            = item.Title;
            ctile.ImageUrl         = item.ImageUrl;
            ctile.IsCommandChecked = item.IsCommandChecked;

            //ctile.Color = item.Color;
            //ctile.BgColor = item.BgColor;
            ctile.BodyBgColor    = item.BodyBgColor;
            ctile.BodyTextColor  = item.BodyTextColor;
            ctile.TitleBgColor   = item.TitleBgColor;
            ctile.TitleTextColor = item.TitleTextColor;
            ctile.Shape          = item.Shape;
            ctile.SortOrder      = item.SortOrder;
            ctile.IsManual       = item.IsManual;
            ctile.FontSize       = item.FontSize;
            ctile.FontSizeTitle  = item.FontSizeTitle;

            try
            {
                await _repo.Update(ctile);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(ctile);
        }
Exemplo n.º 2
0
 public async Task <CharacterCommandTile> Create(CharacterCommandTile item)
 {
     return(await _repo.Add(item));
 }