示例#1
0
 public static bool Eliminar(Entidades.Emails id)
 {
     using (var db = new DetalleDb())
     {
         try
         {
             db.Entry(id).State = System.Data.Entity.EntityState.Deleted;
             db.SaveChanges();
             return(true);
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
示例#2
0
        public static bool Guardar(Entidades.Emails n)
        {
            bool retono = false;

            using (var db = new DetalleDb())
            {
                try
                {
                    db.email.Add(n);
                    db.SaveChanges();
                    retono = true;
                }
                catch (Exception)
                {
                    throw;
                }
                return(retono);
            }
        }