Exemple #1
0
        public int GetComplexTypeModelCount()
        {
            ICraneAccess dataAccess = new SqlServerAccess(ConnectionString);

            return(dataAccess
                   .Query()
                   .ExecuteScalar <int>("dbo.GetComplexModelCount"));
        }
Exemple #2
0
        public List <ReservedColumnNameTest> GetReservedColumnNameTests()
        {
            ICraneAccess dataAccess = new SqlServerAccess(ConnectionString);

            return(dataAccess
                   .Query()
                   .ExecuteReader <ReservedColumnNameTest>("dbo.GetReservedColumnNameTests")
                   .ToList());
        }
Exemple #3
0
        public List <SchemaTest2> GetSchemaTest2List()
        {
            ICraneAccess dataAccess = new SqlServerAccess(ConnectionString);

            return(dataAccess
                   .Query()
                   .AddSqlParameter("@Schema", "AnotherSchema")
                   .ExecuteReader <SchemaTest2>("dbo.GetSchemaTest")
                   .ToList());
        }
Exemple #4
0
        public List <Book> GetBookList(string isbn = null)
        {
            ICraneAccess dataAccess = new SqlServerAccess(ConnectionString);

            return(dataAccess
                   .Query()
                   .AddSqlParameter("@Isbn", isbn)
                   .ExecuteReader <Book>("dbo.GetBooks")
                   .ToList());
        }
Exemple #5
0
        public List <CustomIdentityColumnNameTest> GetCustomIdentityColumnNameTestList()
        {
            ICraneAccess dataAccess = new SqlServerAccess(ConnectionString);

            return(dataAccess
                   .Query()
                   .CustomColumnMapping <CustomIdentityColumnNameTest>(x => x.Id, "ID_COMPANY")
                   .ExecuteReader <CustomIdentityColumnNameTest>("dbo.GetCustomIdentityColumnNameTestList")
                   .ToList());
        }
Exemple #6
0
        public List <CustomColumnMappingTest> GetCustomColumnMappingTests()
        {
            ICraneAccess dataAccess = new SqlServerAccess(ConnectionString);

            return(dataAccess
                   .Query()
                   .CustomColumnMapping <CustomColumnMappingTest>(x => x.NaturalIdTest, "NaturalId")
                   .CustomColumnMapping <CustomColumnMappingTest>(x => x.ColumnXIsDifferent, "ColumnX")
                   .CustomColumnMapping <CustomColumnMappingTest>(x => x.ColumnYIsDifferentInDatabase, "ColumnY")
                   .ExecuteReader <CustomColumnMappingTest>("dbo.GetCustomColumnMappingTests")
                   .ToList());
        }