public bool Modificar(ref VEHICULO oVEHICULO) { try { return new VehiculoDao().Modificar(ref oVEHICULO); } catch (FaultException ex) { throw new FaultException(ex.Message); } }
public bool Modificar(ref VEHICULO oVEHICULO) { try { using (Contexto = new AlquilerEntities()) { Contexto.Entry(oVEHICULO).State = System.Data.Entity.EntityState.Modified; var vResult = Contexto.SaveChanges(); if (vResult > 0) return true; else return false; } } catch (Exception ex) { throw ex; } }
public bool Agregar(ref VEHICULO oVEHICULO) { try { using (Contexto = new AlquilerEntities()) { Contexto.VEHICULO.Add(oVEHICULO); var vResult = Contexto.SaveChanges(); if (vResult > 0) return true; else return false; } } catch (Exception ex) { throw ex; } }