コード例 #1
0
 public Sirket SelectSirketById(int SirketId)
 {
     try
     {
         Sirket responseEntitiy;
         using (var repo = new SirketRepository())
         {
             responseEntitiy = repo.SelectedById(SirketId);
             if (responseEntitiy == null)
             {
                 throw new NullReferenceException("Sirket doesnt exists!");
             }
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:SirketBusiness::SelectSirketById::Error occured.", ex);
     }
 }
コード例 #2
0
 public Sirket SirketSecById(int sirketID)
 {
     try
     {
         Sirket secilenSirket;
         using (var repo = new SirketRepository())
         {
             secilenSirket = repo.SelectedById(sirketID);
             if (secilenSirket == null)
             {
                 throw new NullReferenceException("Girilen SirketID bulunamadi!");
             }
         }
         return(secilenSirket);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("Business:SirketBusiness::SirketSecById::Hata Oluştu.", ex);
     }
 }