Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How do I get the first value from this collection using Linq to Entities?
- using (kdEntities db = new kdEntities())
- {
- Label lbl = sender as Label;
- IQueryable<UserGroup> userGroups = from UserGroup in db.UserGroups where UserGroup.UgpID == 1 select UserGroup;
- foreach (var group in userGroups)
- {
- lbl.Text = group.UgpDescription;
- }
- }
- userGroups.FirstOrDefault();
Add Comment
Please, Sign In to add comment