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); } }
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); } }