Esempio n. 1
0
        public void Adjuntar(Adjunto adjunto)
        {
            try
            {
                using (var context = new TestContext())
                {
                    context.Entry(this).State = EntityState.Unchanged;

                    context.Entry(adjunto).State = EntityState.Added;

                    context.SaveChanges();
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }