Esempio n. 1
0
        /// <summary>
        /// StokHareketleriDto tipinde entity alır. Aldığı datayı veritabanında günceller.
        /// Hata alması durumunda -1 başarılı olması durumunda 1 geri döner.
        /// </summary>
        /// <param name="stokHareketleri"></param>
        /// <returns></returns>
        public int StokHareketiGuncelle(StokHareketleriDto stokHareketleri)
        {
            int result = -1;

            DynamicTryCatch.TryCatchLogla(() =>
            {
                result = _uow.GenericRepository <StokHareketleriDto>().Update(stokHareketleri);
                _uow.Commit();
            }, MethodBase.GetCurrentMethod().Name);
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// DepoDto tipinde entity alır ve veritabanında günceller.
        /// Hata alması durumunda -1 döner.
        /// </summary>
        /// <param name="depo"></param>
        /// <returns></returns>
        public int DepoDuzenle(DepoDto depo)
        {
            int result = -1;

            DynamicTryCatch.TryCatchLogla(() =>
            {
                _uow.GenericRepository <DepoDto>().Update(depo);
                result = _uow.Commit();
                _uow.Dispose();
            }, MethodBase.GetCurrentMethod().Name);
            return(result);
        }