コード例 #1
0
 public Mesaj GetByID(int entityID)
 {
     if (entityID != 0)
     {
         try
         {
             return(_mesajRepo.Get(a => a.MesajID == entityID));
         }
         catch
         {
             throw new Exception("Beklenmedik bir hata oluştu.");
         }
     }
     else
     {
         throw new Exception("Mesaj Silinemedi.Lütfen geçerli bir ID değeri girin.");
     }
 }
コード例 #2
0
        public void DeleteByID(int entityID)
        {
            Mesaj currentMesaj = _mesajDAL.Get(a => a.MesajID == entityID);

            _mesajDAL.Remove(currentMesaj);
        }