This is my employee table and it contain 2 fields called EmployeeID and DisplayName . EmployeeID is primary key. What i need is i want to retrieve these tables values one by one and assign that values (Which i retrieve one by one from table ) to variables.
Eg
var1 = yasin var2 = rajan..
var yasinempid = (from emp in db.Employees where emp.DisplayName == "Yasin" select emp.EmployeeID).FirstOrDefault();
Now i want to find the ID of yasin employee.so i gave yasin value directly in the query. But this is not correct way because i have limited no of employees so i can able to find employee ID easily . But i have lot of employees means this hardcode value is not correct way and also it wont give correct solution right . So that i need alternate solution for this problem.
I tried my level best to explain this issue. Any one understand my issue and help me to resolve this problem.
Advance thanks.