Exemplo n.º 1
0
        public void SaveUpdateInstrukcja(int InstrukcjaID, InstrukcjaViewModel instrukcjaViewModel)
        {
            var instrukcjaEntity = mInstrukcjaRepository.FindInstrukcjaById(InstrukcjaID);

            if (instrukcjaEntity != null)
            {
                mInstrukcjaRepository.UpdateInstrukcja(InstrukcjaID, mASMapper.Map(instrukcjaViewModel));
            }
            else
            {
                var instrukcjaEntity2 = mASMapper.Map(instrukcjaViewModel);
                mInstrukcjaRepository.AddNewAsync(instrukcjaEntity2);
            }
        }
Exemplo n.º 2
0
 public Instrukcja Map(InstrukcjaViewModel instrukcja) => mMapper.Map <Instrukcja>(instrukcja);