예제 #1
0
        //getall
        public IEnumerable <LocationModel> GetAllLocations()
        {
            DbCmdDef cmdDef = new DbCmdDef
            {
                DbCommandText = "dbo.Location_SelectAll",
                DbCommandType = System.Data.CommandType.StoredProcedure,
            };

            return(Adapter.LoadObject <LocationModel>(cmdDef));
        }
예제 #2
0
        public IEnumerable <Person> GetAllPersons()
        {
            DbCmdDef cmdDef = new DbCmdDef
            {
                DbCommandText = "dbo.People_SelectAll",
                DbCommandType = System.Data.CommandType.StoredProcedure
            };

            return(Adapter.LoadObject <Person>(cmdDef));
        }
예제 #3
0
        public IEnumerable <BlogDomain> SelectAll()
        {
            DbCmdDef cmdDef = new DbCmdDef
            {
                DbCommandText = "dbo.Review_SelectAll",
                DbCommandType = System.Data.CommandType.StoredProcedure,
            };

            return(Adapter.LoadObject <BlogDomain>(cmdDef));
        }
예제 #4
0
        public IEnumerable <Product> GetAllProducts()
        {
            DbCmdDef cmdDef = new DbCmdDef
            {
                DbCommandText = "dbo.Product_SelectAll",
                DbCommandType = System.Data.CommandType.StoredProcedure,
                DbParameters  = new[]
                {
                    SqlDbParameter.Instance.BuildParameter("@DisplayActive", true, System.Data.SqlDbType.Bit)
                }
            };

            return(Adapter.LoadObject <Product>(cmdDef));
        }