public int GetEmpId(string nombre)
{
try
{
var idemp_query = from p in entities.empleados
where p.nombres == nombre
select p.id;
int emp_id = Convert.ToInt32(idemp_query.First());
return emp_id;
}catch(Exception err){
throw new Exception(err.ToString() + "--Empleados.cs / GetEmpId(string)");
}
}