The user logs in. The user can belong to many different ServiceAreas I am attempting to try and store the user's details in a `Session` that holds all the information for the user. The `foreach` keeps going round and errors when it tries to add the same `key`. That is my first error.

Q1. How will i stop this from happening.

Q2. Will I be able to store the users details in the `Session` whether they belong to 4 serviceAreas or 1?

```
var user = (from u in db.tbl_UserServiceAreaDetails
        where u.tbl_User.UserName.Equals(txt_LoginName.Text)
        && u.tbl_User.Password.Equals(txt_Password.Text)
        select u).FirstOrDefault();

if (user != null)
{
var serviceAreaID = user.serviceAreaID;
var serviceArea = user.tbl_ServiceArea.ServiceArea;

UserClass userDetails = new UserClass();

userDetails.UserName = user.tbl_User.UserName;

foreach (var item in serviceArea)
{
    userDetails.ServiceArea.Add(serviceAreaID, serviceArea);                
}
Session["User"] = userDetails;

```

`UserClass`

```
class UserClass
{
    public string UserName { get; set; }
    public Dictionary<int, string> ServiceArea = new Dictionary<int, string>();
}

```

Do I need to do an `if item. Something` for Q1?