Esempio n. 1
0
        public void Update(CreditRatingPaymentDeadline creditRatingPaymentDeadlineToSave)
        {
            Stopwatch timespan = Stopwatch.StartNew();

            try
            {
                db.Entry(creditRatingPaymentDeadlineToSave).State = EntityState.Modified;
                db.SaveChanges();

                timespan.Stop();
                log.TraceApi("SQL Database", "CreditRatingPaymentDeadlineRepository.Update", timespan.Elapsed, "creditRatingPaymentDeadlineToSave={0}", creditRatingPaymentDeadlineToSave);
            }
            catch (Exception e)
            {
                log.Error(e, "Error in CreditRatingPaymentDeadlineRepository.Update(creditRatingPaymentDeadlineToSave={0})", creditRatingPaymentDeadlineToSave);
                throw;
            }
        }
Esempio n. 2
0
        public void Create(CreditRatingPaymentDeadline creditRatingPaymentDeadlineToAdd)
        {
            Stopwatch timespan = Stopwatch.StartNew();

            try
            {
                db.CreditRatingPaymentDeadlines.Add(creditRatingPaymentDeadlineToAdd);
                db.SaveChanges();

                timespan.Stop();
                log.TraceApi("SQL Database", "CreditRatingPaymentDeadlineRepository.Create", timespan.Elapsed, "creditRatingPaymentDeadlineToAdd={0}", creditRatingPaymentDeadlineToAdd);
            }
            catch (Exception e)
            {
                log.Error(e, "Error in CreditRatingPaymentDeadlineRepository.Create(creditRatingPaymentDeadlineToAdd={0})", creditRatingPaymentDeadlineToAdd);
                throw;
            }
        }
Esempio n. 3
0
        public void Delete(int creditRatingPaymentDeadlineID)
        {
            Stopwatch timespan = Stopwatch.StartNew();

            try
            {
                CreditRatingPaymentDeadline crpd = db.CreditRatingPaymentDeadlines.Find(creditRatingPaymentDeadlineID);
                db.CreditRatingPaymentDeadlines.Remove(crpd);
                db.SaveChanges();

                timespan.Stop();
                log.TraceApi("SQL Database", "CreditRatingPaymentDeadlineRepository.Delete", timespan.Elapsed, "creditRatingPaymentDeadlineID={0}", creditRatingPaymentDeadlineID);
            }
            catch (Exception e)
            {
                log.Error(e, "Error in CreditRatingPaymentDeadlineRepository.Delete(creditRatingPaymentDeadlineID={0})", creditRatingPaymentDeadlineID);
                throw;
            }
        }
Esempio n. 4
0
 public Task UpdateAsync(CreditRatingPaymentDeadline creditRatingPaymentDeadlineToSave)
 {
     throw new NotImplementedException();
 }