Olá Senhores,
Estou querendo criar uma função que vai verificar se o registro está duplicado ou não, e retorne true ou false.
Qual a melhor maneira de fazer ?
Estou tentando fazer, porém parei aqui:
public bool LINQconsultarDuplicidade(int p_intIdSetor, int p_intIdCargo)
{
var dados = from u in ef.SetoresCargos
where u.Setores.Id == p_intIdSetor && u.Cargos.Id == p_intIdCargo
select new MTSetorCargo()
{
Id = u.Id,
IdCargo = u.Cargos.Id,
IdSetor = u.Setores.Id,
Cargo = u.Cargos.Descricao,
Setor = u.Setores.Setor
};
return ;
}
Tércio Padilha