Created
March 26, 2018 15:20
-
-
Save mariusmg/ae6958080c9289fd29ec9c82e14f49e8 to your computer and use it in GitHub Desktop.
C# anonymous object to tuple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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