Skip to content

Instantly share code, notes, and snippets.

@mariusmg
Created March 26, 2018 15:20
Show Gist options
  • Save mariusmg/ae6958080c9289fd29ec9c82e14f49e8 to your computer and use it in GitHub Desktop.
Save mariusmg/ae6958080c9289fd29ec9c82e14f49e8 to your computer and use it in GitHub Desktop.
C# anonymous object to tuple
public (string content, DateTime udapteDate) Get(int id)
{
return this.Find().Where(x => x.Id == id).Select(note => new {content = note.Content, updateDate = note.UpdateDate}).FirstOrDefault();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment