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; } } }
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); } }