public bool Sil(int id)
 {
     try
     {
         bool isSuccess;
         using (var repo = new EmanetRepository())
         {
             isSuccess = repo.DeleteById(id);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         throw new Exception("BusinessLogic:EmanetBusiness::DeleteEmanet::Error occured.", ex);
     }
 }
 public bool Ekle(Emanet entity)
 {
     try
     {
         bool isSuccess;
         using (var repo = new EmanetRepository())
         {
             isSuccess = repo.Ekle(entity);
         }
         return(isSuccess);
     }
     catch (Exception ex)
     {
         throw new Exception("BusinessLogic:EmanetBusiness::InsertEmanet::Error occured.", ex);
     }
 }
        public List <Emanet> Listele()
        {
            var responseEntities = new List <Emanet>();

            try
            {
                using (var repo = new EmanetRepository())
                {
                    foreach (var entity in repo.Listele())
                    {
                        responseEntities.Add(entity);
                    }
                }
                return(responseEntities);
            }
            catch (Exception ex)
            {
                throw new Exception("BusinessLogic:EmanetBusiness::SelectAllEmanet::Error occured.", ex);
            }
        }