public bool AtualidarCliente(ClienteEntity oCliente) { bool returnSucess = false; try { using (var myModel = new ContextModel.Model()) { ClienteEntity updateCliente = new ClienteEntity(); myModel.Update(oCliente); myModel.SaveChanges(); returnSucess = true; } } catch (Exception ex) { throw ex; } return(returnSucess); }
public bool IncluirCliente(ClienteEntity oCliente) { bool returnSucess = false; try { using (ContextModel.Model myModel = new ContextModel.Model()) { myModel.Add(oCliente); myModel.SaveChanges(); returnSucess = true; } } catch (Exception ex) { throw ex; } return(returnSucess); }
public bool IncluirLogradouro(LogradouroEntity oLogradouro) { bool returnSucess = false; try { using (ContextModel.Model myModel = new ContextModel.Model()) { myModel.Add(oLogradouro); myModel.SaveChanges(); returnSucess = true; } } catch (Exception ex) { throw ex; } return(returnSucess); }