Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Aug 11th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. How do I get the first value from this collection using Linq to Entities?
  2. using (kdEntities db = new kdEntities())
  3.         {
  4.             Label lbl = sender as Label;
  5.             IQueryable<UserGroup> userGroups = from UserGroup in db.UserGroups where UserGroup.UgpID == 1 select UserGroup;
  6.  
  7.             foreach (var group in userGroups)
  8.             {
  9.                 lbl.Text = group.UgpDescription;
  10.             }
  11.         }
  12.    
  13. userGroups.FirstOrDefault();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top