this is the select list in the action controller, 

```
ViewBag.UserName = new SelectList(db.Users.Where(g => g.UserName == User.Identity.GetUserName()), "UserName", "UserName");

```

which I am passing to the view :

```
 <div class="form-group">
            @Html.LabelFor(model => model.UserName, "UserName", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("UserName", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.UserName, "", new { @class = "text-danger" })
            </div>
        </div>

```

and it's not working erro:

> 
> LINQ to Entities does not recognize the method 'System.String
>  GetUserName(System.Security.Principal.IIdentity)' method, and this
>  method cannot be translated into a store expression.
> 
> 
>