BL.Security.GetEmpId C# (CSharp) Method

GetEmpId() public method

public GetEmpId ( string nombre ) : int
nombre string
return int
        public int GetEmpId(string nombre)
        {
            var idemp_query = from p in entidad.empleados
                              where nombre == p.nombres
                              select p.id;
            int emp_id = Convert.ToInt32(idemp_query.First());

            return emp_id;
        }