Beispiel #1
0
        //public CharacterImageTile GetById(int? id)
        //{
        //    throw new NotImplementedException();
        //}

        public async Task <CharacterTextTile> Update(CharacterTextTile item)
        {
            var textTile = await _repo.Get((int)item.TextTileId);

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

            textTile.Text  = item.Text;
            textTile.Title = item.Title;

            textTile.BodyBgColor    = item.BodyBgColor;
            textTile.BodyTextColor  = item.BodyTextColor;
            textTile.TitleBgColor   = item.TitleBgColor;
            textTile.TitleTextColor = item.TitleTextColor;
            textTile.Shape          = item.Shape;
            textTile.SortOrder      = item.SortOrder;
            textTile.IsManualTitle  = item.IsManualTitle;
            textTile.FontSizeTitle  = item.FontSizeTitle;
            textTile.IsManualText   = item.IsManualText;
            textTile.FontSizeText   = item.FontSizeText;
            try
            {
                await _repo.Update(textTile);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(textTile);
        }
Beispiel #2
0
 public async Task <CharacterTextTile> Create(CharacterTextTile item)
 {
     return(await _repo.Add(item));
 }