Ejemplo n.º 1
0
 public void Update(Security dbEntity, Security entity)
 {
     if (dbEntity == null)
     {
         throw new ArgumentException(nameof(Security));
     }
     entity.SecurityId            = dbEntity.SecurityId;
     _context.Entry(entity).State = EntityState.Modified;
     _context.SaveChanges();
 }
Ejemplo n.º 2
0
 public void Update(Portfolio dbEntity, Portfolio portfolio)
 {
     if (dbEntity == null)
     {
         throw new ArgumentException(nameof(Portfolio));
     }
     portfolio.Date                  = portfolio.Date.Date;
     portfolio.PortfolioId           = dbEntity.PortfolioId;
     _context.Entry(portfolio).State = EntityState.Modified;
     _context.SaveChanges();
 }