Exemplo n.º 1
0
        public bool UruneYorumEkle(YorumEkleVM model)
        {
            Urun urun = _urunRepository.GetSingle(u => u.Id == model.UrunId);

            urun.Yorumlar = new List <Yorum>
            {
                new Yorum
                {
                    Adi    = model.Adi,
                    Soyadi = model.Soyadi,
                    Onay   = false,
                    Email  = model.Mail,
                    Mesaj  = model.Mesaj
                }
            };
            return(_urunRepository.Save() > 0);
        }