Last active
May 31, 2021 11:07
-
-
Save giacomelli/4dda230a09941b6300468a71ee3812ab to your computer and use it in GitHub Desktop.
SqlAsFile - http://diegogiacomelli.com.br/sqlasfile
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
var projectNamespace = "Sample.Data"; |
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
--<cte> | |
WITH LastMessages(ContactId, Id, NotRead) | |
AS ( | |
) | |
--</cte> |
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
install-package SqlAsFile |
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
--<test-args> | |
DECLARE @name VARCHAR(100) = 'test'; | |
DECLARE @surname VARCHAR(200) = NULL; | |
--</test-args> |
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
// Using the SQL inside of the file SampleSql2.sql on the folder | |
// SampleData\Data\SampleNamespace1\SampleSubNamespace1. | |
using SampleData.Data.SampleNamespace1.SampleSubNamespace1; | |
... | |
var rows = connection.Query(Sql.SampleSql2).AsList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment