Exemplo n.º 1
0
        public void UpdateDeclarationType(DeclarationTypeItem declarationTypeItem)
        {
            var entity = new DeclarationType
            {
                DeclarationTypeID   = declarationTypeItem.DeclarationTypeID,
                DeclarationTypeName = declarationTypeItem.DeclarationTypeName
            };

            db.DeclarationTypes.Attach(entity);
            db.Entry(entity).State = EntityState.Modified;
            db.SaveChanges();
        }