Пример #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));
        }