Пример #1
0
        /// <summary>
        /// TODO:
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <bool> SaveColor(ColorModel model)
        {
            var entity = model.MapTo <ColorPallet>();

            if (model.Id < 1)
            {
                await _colorRepository.Insert(entity);
            }
            else
            {
                await _colorRepository.Update(entity);
            }

            return(true);
        }
Пример #2
0
 public static Color ToColor(this ColorModel entity)
 {
     return(entity.MapTo <ColorModel, Color>());
 }