private GetStoreHoursDataResponse GetStoreDayHours(GetStoreHoursDataRequest request)
            {
                ThrowIf.Null(request, "request");

                using (DatabaseContext databaseContext = new DatabaseContext(request.RequestContext))
                {
                    var query = new SqlPagedQuery(request.QueryResultSettings)
                    {
                        DatabaseSchema = "crt",
                        Select         = new ColumnSet("DAY", "OPENTIME", "CLOSINGTIME", "RECID"),
                        From           = "ISVRETAILSTOREHOURSVIEW",
                        Where          = "STORENUMBER = @storeNumber",
                    };

                    query.Parameters["@storeNumber"] = request.StoreNumber;
                    return(new GetStoreHoursDataResponse(databaseContext.ReadEntity <DataModel.StoreDayHours>(query)));
                }
            }
            public System.Web.OData.PageResult <SampleDataModel.StoreDayHours> GetStoreDaysByStore(ODataActionParameters parameters)
            {
                if (parameters == null)
                {
                    throw new ArgumentNullException("parameters");
                }

                var runtime = CommerceRuntimeManager.CreateRuntime(this.CommercePrincipal);

                QueryResultSettings queryResultSettings = QueryResultSettings.SingleRecord;

                queryResultSettings.Paging = new PagingInfo(10);

                var request = new GetStoreHoursDataRequest((string)parameters["StoreNumber"])
                {
                    QueryResultSettings = queryResultSettings
                };
                PagedResult <SampleDataModel.StoreDayHours> hours = runtime.Execute <GetStoreHoursDataResponse>(request, null).DayHours;

                return(this.ProcessPagedResults(hours));
            }