public HomeController(ArabaRepository araba, ArabaKonutIsModel model, KonutRepository konut)
 {
     _arabaRep = araba;
     _model    = model;
     _konutRep = konut;
     //_ısRep = ıs;
 }
 public bool UpdateAraba(Araba entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new ArabaRepository())
         {
             isSuccess = repo.Update(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         throw new Exception("ArabaBusiness:ArabaRepository:Güncelleme Hatası", ex);
     }
 }
 public bool ArabaDelete(int ArabaId)
 {
     try
     {
         bool isSuccess;
         using (var repo = new ArabaRepository())
         {
             isSuccess = repo.Delete(ArabaId);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         throw new Exception("ArabaBusiness:ArabaRepository:Silme Hatası", ex);
     }
 }
 public bool InsertAraba(Araba entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new ArabaRepository())
         {
             isSuccess = repo.Insert(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         throw new Exception("SOABusiness:ArabaBusiness::InsertAraba::Error occured.", ex);
     }
 }
Exemple #5
0
 public bool DeleteArabaById(int ID)
 {
     try
     {
         bool isSuccess;
         using (var repo = new ArabaRepository())
         {
             isSuccess = repo.DeletedById(ID);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:ArabaBusiness::DeleteAraba::Error occured.", ex);
     }
 }
Exemple #6
0
 public bool UpdateAraba(Araba entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new ArabaRepository())
         {
             isSuccess = repo.Update(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:ArabaBusiness::UpdateAraba::Error occured.", ex);
     }
 }
 public Araba SelectedIdAraba(int ArabaId)
 {
     try
     {
         Araba responseEntitiy;
         using (var repo = new ArabaRepository())
         {
             responseEntitiy = repo.IdSelect(ArabaId);
             if (responseEntitiy == null)
             {
                 throw new NullReferenceException("Araba doesnt exists!");
             }
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         throw new Exception("ArabaBusiness::SelectCustomerById::Error occured.", ex);
     }
 }
        public List <Araba> SelectAllAraba()
        {
            var responseEntities = new List <Araba>();

            try
            {
                using (var repo = new ArabaRepository())
                {
                    foreach (var entity in repo.SelectAll())
                    {
                        responseEntities.Add(entity);
                    }
                }
                return(responseEntities);
            }
            catch (Exception ex)
            {
                throw new Exception("SOABusiness:ArabaBusiness::SelectAllAraba::Error occured.", ex);
            }
        }
Exemple #9
0
 public Araba SelectArabaById(int ArabaId)
 {
     try
     {
         Araba responseEntitiy;
         using (var repo = new ArabaRepository())
         {
             responseEntitiy = repo.SelectedById(ArabaId);
             if (responseEntitiy == null)
             {
                 throw new NullReferenceException("Araba doesnt exists!");
             }
         }
         return(responseEntitiy);
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic:ArabaBusiness::SelectArabaById::Error occured.", ex);
     }
 }
Exemple #10
0
        public List <Araba> SelectAllAraba()
        {
            var responseEntities = new List <Araba>();

            try
            {
                using (var repo = new ArabaRepository())
                {
                    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:ArabaBusiness::SelectAllAraba::Error occured.", ex);
            }
        }