/// <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); }
public static Color ToColor(this ColorModel entity) { return(entity.MapTo <ColorModel, Color>()); }