How to find a single record with Subsonic 3

Tags:

 

 

How to find a single record with Subsonic 3 using SingleOrDefault or Find.
 
var customer = catalog.data.customer.SingleOrDefault(x => x.id == "00001");
customer_id.Text = customer.id;

 

var customer = catalog.data.customer.Find(x => x.name == "mark").OrderBy(x => x.left);
 

 

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.