public bool UpdateSirket(Sirket entity) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.Update(entity); } return(isSuccess); } catch (Exception ex) { throw new Exception("SirketBusiness:SirketRepository:Güncelleme Hatası", ex); } }
public Sirket SirketIdSec(int sirketId) { try { Sirket responseEntitiy = null; using (var repo = new SirketRepository()) { responseEntitiy = repo.IdSec(sirketId); } return(responseEntitiy); } catch (Exception ex) { throw new Exception("SirketBusiness:SirketRepository:Seçme Hatası", ex); } }
public bool InsertSirket(Sirket entity) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.Insert(entity); } return(isSuccess); } catch (Exception ex) { throw new Exception("SOABusiness:SirketBusiness::InsertSirket::Error occured.", ex); } }
public bool SirketDelete(int SirketId) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.Delete(SirketId); } return(isSuccess); } catch (Exception ex) { throw new Exception("SirketBusiness::SirketRepository:Silme Hatası", ex); } }
public bool DeleteSirketById(int ID) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.DeletedById(ID); } return(isSuccess); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("BusinessLogic:SirketBusiness::DeleteSirket::Error occured.", ex); } }
public bool SirketSilById(int sirketID) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.DeletedById(sirketID); } return(isSuccess); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("Business:SirketBusiness::SirketSilById::Hata Oluştu.", ex); } }
public bool UpdateSirket(Sirket entity) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.Update(entity); } return(isSuccess); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("BusinessLogic:SirketBusiness::UpdateSirket::Error occured.", ex); } }
public bool SirketGuncelle(Sirket sirket) { try { bool isSuccess; using (var repo = new SirketRepository()) { isSuccess = repo.Update(sirket); } return(isSuccess); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("Business:SirketBusiness::SirketGuncelle::Hata Oluştu.", ex); } }
public Sirket SirketIdSil(int sirketId) { try { using (var repo = new SirketRepository()) { if (repo.IdSil(sirketId)) { return(repo.IdSec(sirketId)); } } return(null); } catch (Exception ex) { throw new Exception("SirketBusiness:SirketRepository:Silme Hatası", ex); } }
public Sirket SirketGuncelle(Sirket entity) { try { using (var repo = new SirketRepository()) { if (repo.Guncelle(entity)) { return(entity); } } return(null); } catch (Exception ex) { throw new Exception("SirketBusiness:SirketRepository:Güncelleme Hatası", ex); } }
public List <Sirket> SirketHepsiniSec() { var responseEntities = new List <Sirket>(); try { using (var repo = new SirketRepository()) { foreach (var entity in repo.HepsiniSec()) { responseEntities.Add(entity); } } return(responseEntities); } catch (Exception ex) { throw new Exception("SirketBusiness:SirketRepository:Hepsini Seçme Hatası", ex); } }
public Sirket SelectedIdSirket(int SirketId) { try { Sirket responseEntitiy; using (var repo = new SirketRepository()) { responseEntitiy = repo.IdSelect(SirketId); if (responseEntitiy == null) { throw new NullReferenceException("Sirket doesnt exists!"); } } return(responseEntitiy); } catch (Exception ex) { throw new Exception("SirketBusiness::SelectSirketrById::Error occured.", ex); } }
public List <Sirket> SelectAllSirket() { var responseEntities = new List <Sirket>(); try { using (var repo = new SirketRepository()) { foreach (var entity in repo.SelectAll()) { responseEntities.Add(entity); } } return(responseEntities); } catch (Exception ex) { throw new Exception("SOABusiness:SirketBusiness::SelectAllSirket::Error occured.", ex); } }
public List <Sirket> SelectAllSirket() { var sirketListesi = new List <Sirket>(); try { using (var repo = new SirketRepository()) { foreach (var sirket in repo.SelectAll()) { sirketListesi.Add(sirket); } } return(sirketListesi); } catch (Exception ex) { //LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("Business:SirketBusiness::SelectAllSirket::Hata Oluştu.", 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); } }
public List <Sirket> SelectAllSirket() { var responseEntities = new List <Sirket>(); try { using (var repo = new SirketRepository()) { foreach (var entity in repo.SelectAll()) { responseEntities.Add(entity); } } return(responseEntities); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("BusinessLogic:SirketBusiness::SelectAllSirket::Error occured.", ex); } }
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 SirketLogin(string sirketKullaniciAdi, string sirketSifre) { try { Sirket sirket = null; using (var repo = new SirketRepository()) { sirket = repo.Login(sirketKullaniciAdi, sirketSifre); if (sirket == null) { throw new NullReferenceException("Sirket doesnt exists!"); } } return(sirket); } catch (Exception ex) { LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true); throw new Exception("BusinessLogic:SirketBusiness::SirketLogin::Error occured.", ex); } }
public UnitOfWork(SirketContext context) { _sirketContext = context; SirketRepository = new SirketRepository(_sirketContext); }