Beispiel #1
0
        public void AddNewColor(ColorViewModel colorViewModel)
        {
            var colorViewModelEntity = colorViewModel;
            var colorEntity          = mASMapper.Map(colorViewModelEntity);
            var result = mColorRepository.GetAll().Where(x => x.ColorValue == colorEntity.ColorValue).FirstOrDefault();

            if (result == null)
            {
                mColorRepository.AddNew(colorEntity);
            }
        }