public int Cadastrar(Pedido entity) { try { const string query = @"INSERT INTO Pedido (IdStatus, ValorPedido, ValorPedido) VALUES (:PrecoVenda, :ValorPedido, :ValorPedido)"; var parametros = new { entity.IdStatus, entity.ValorPedido, entity.DataPrevisaoEntrega }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Pedido>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(StatusPedido entity) { try { const string query = @"INSERT INTO StatusPedido (Nome, Ordem) VALUES (:Nome, :Ordem)"; var parametros = new { entity.Nome, entity.Ordem }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <StatusPedido>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(CandidatoVaga entity) { try { const string query = @"INSERT INTO CandidatoVaga (IdCandidato, IdVaga) VALUES (:IdCandidato, :IdVaga)"; var parametros = new { entity.IdCandidato, entity.IdVaga }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <CandidatoVaga>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(VagaTecnologia entity) { try { const string query = @"INSERT INTO VagaTecnologia (IdVaga, IdTecnologia, IdEmpresa, Peso) VALUES (:IdVaga, :IdTecnologia, :IdEmpresa, :Peso)"; var parametros = new { entity.IdVaga, entity.IdTecnologia, entity.IdEmpresa, entity.Peso }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <VagaTecnologia>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(Usuario entity) { try { const string query = @"INSERT INTO Usuarios (Nome, CPF, Email, Telefone, Sexo, DataNascimento) VALUES (:Nome, :CPF, :Email, :Telefone, :Sexo, :DataNascimento)"; var parametros = new { entity.Nome, entity.CPF, entity.Email, entity.Telefone, entity.Sexo, entity.DataNascimento }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Usuario>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(HistoricoStatus entity) { try { const string query = @"INSERT INTO HistoricoStatus (IdPedido, IdStatus, DataStatus) VALUES (:IdPedido, :IdStatus, :DataStatus)"; var parametros = new { entity.IdPedido, entity.IdStatus, entity.DataStatus }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <HistoricoStatus>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(Produto entity) { try { const string query = @"INSERT INTO Produtos (Nome, PrecoVenda) VALUES (:Nome, :PrecoVenda)"; var parametros = new { entity.Nome, entity.PrecoVenda }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Produto>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(Candidato entity) { try { const string query = @"INSERT INTO Candidato (Nome, Curriculo, Status) VALUES (:Nome, :Curriculo, :Status)"; var parametros = new { entity.Nome, entity.Curriculo, entity.Status }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Candidato>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); } catch (Exception ex) { throw ex; } }
public int Cadastrar(Empresa entity) { const string query = @"INSERT INTO Empresa (Nome, QuantidadeVagas) VALUES (:Nome, :QuantidadeVagas)"; var parametros = new { entity.Nome, entity.QuantidadeVagas }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Empresa>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); }
public int Cadastrar(Tecnologia entity) { const string query = @"INSERT INTO Tecnologia (Nome, Peso) VALUES (:Nome, :Peso)"; var parametros = new { entity.Nome, entity.Peso }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Tecnologia>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); }
public int Cadastrar(ItemPedido entity) { const string query = @"INSERT INTO ItemPedido (IdPedido, IdProduto, PrecoVenda) VALUES (:IdPedido, :IdProduto, :PrecoVenda)"; var parametros = new { entity.IdPedido, entity.IdProduto, entity.PrecoVenda }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <ItemPedido>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); }
public int Cadastrar(Vaga entity) { const string query = @"INSERT INTO Vaga (IdEmpresa, Nome, Descricao, Quantidade) VALUES (:IdEmpresa, :Nome, :Descricao, :Quantidade)"; var parametros = new { entity.IdEmpresa, entity.Nome, entity.Descricao, entity.Quantidade }; string sequenceName = null; if (DataBaseType == DataBaseType.Oracle) { sequenceName = SequenceHelper.GetSequenceName <Vaga>(entity); } return(Convert.ToInt32(IDbConn.CommandInsert(query, DataBaseType, parametros, sequenceName: sequenceName))); }
public int Insert(Sample entity) { const string query = @"INSERT INTO Sample (Name) VALUES (@name)"; return((int)IDbConn.CommandInsert(query, DataBaseType, new { name = entity.Name })); }