Last active
November 22, 2016 22:46
-
-
Save eschneider999/1b5b15cd733a35be0259d4eece9598b7 to your computer and use it in GitHub Desktop.
Symbiotic ORM ExecuteScalar
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 void TestScalar() | |
{ | |
IDatabaseTypesFactory factory = new DatabaseTypesFactorySqlServer(); | |
factory.ConnectionString = "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=D:\\Dev\\FrozenElephant\\SymbioticORM\\SqlDatabase\\SymbioticTestLocal.mdf;Integrated Security=True;Connect Timeout=30"; | |
IObjectLoader loader = factory.CreateObjectLoader(); | |
decimal val = loader.ExecuteScalar<decimal>(factory.CreateSqlQuery("Select count(*) from people","TestScalar")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment