Пример #1
0
        public void Update(TEntity entity)
        {
            var entityDB = DbSet.Find(entity.Id);

            _context.Entry(entityDB).CurrentValues.SetValues(entity);

            entity.Usuario       = string.IsNullOrEmpty(_variables.UserName) ? "STFCORP" : _variables.UserName;
            entity.DataAlteracao = DateTime.Now;
            DbSet.Update(entity);
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID,Name,FtpBox,City,State,ZipCode,DaysBeforePSM")] HotelProperty hotelProperty)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hotelProperty).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(hotelProperty));
 }
Пример #3
0
 public void Update(ValorForecast valorForecast)
 {
     _context.Entry(valorForecast);
     DbSet.Update(valorForecast);
     AtualizarDataAlteracaoEUsuario();
 }
Пример #4
0
 public void Update(CityEntity item)
 {
     _context.Entry(item).State = EntityState.Modified;
 }
 public void Update(ForecastET forecast)
 {
     _context.Entry(forecast);
     DbSet.Update(forecast);
     AtualizarDataAlteracaoEUsuario();
 }