├── .gitattributes ├── .gitignore ├── AspNetCore ├── AnnotationEnumType │ ├── AnnotationEnumType.sln │ └── AnnotationEnumType │ │ ├── AnnotationEnumType.csproj │ │ ├── Controllers │ │ └── ValuesController.cs │ │ ├── Models │ │ ├── Appliance.cs │ │ └── EdmModelBuilder.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── AspNetCoreODataSamples.sln ├── BasicEFCoreTest │ ├── BasicEFCoreTest.csproj │ ├── Controllers │ │ └── CustomersController.cs │ ├── Models │ │ ├── Address.cs │ │ ├── Color.cs │ │ ├── Customer.cs │ │ ├── CustomerOrderContext.cs │ │ ├── DataSource.cs │ │ ├── EdmModelBuilder.cs │ │ └── Order.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── README.md │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── BasicWebApiFxSample │ ├── App_Start │ │ └── WebApiConfig.cs │ ├── BasicWebApiFxSample.csproj │ ├── Controllers │ │ └── OperationsController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Models │ │ └── Operation.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── BasicWebApiSample │ ├── BasicWebApiSample.csproj │ ├── Controllers │ │ ├── CustomersController.cs │ │ └── OrdersController.cs │ ├── Models │ │ ├── Address.cs │ │ ├── Color.cs │ │ ├── Customer.cs │ │ ├── CustomerOrderContext.cs │ │ └── Order.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── README.md │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── FunctionCallTest │ ├── FunctionCallTest.sln │ └── FunctionCallTest │ │ ├── Controllers │ │ ├── EngagementController.cs │ │ └── WeatherForecastController.cs │ │ ├── FunctionCallTest.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── OptionalParameterSample │ ├── OptionalParameterSample.sln │ ├── OptionalParameterSample │ │ ├── Controllers │ │ │ └── UsersController.cs │ │ ├── OptionalParameterSample.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── OrderbyTest │ ├── OrderbyTest.sln │ ├── OrderbyTest │ │ ├── Controllers │ │ │ └── CustomersController.cs │ │ ├── Models │ │ │ ├── Address.cs │ │ │ ├── Customer.cs │ │ │ ├── EdmModelBuilder.cs │ │ │ └── Order.cs │ │ ├── OrderbyTest.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md └── SimpleContainmentTest │ ├── SimpleContainmentTest.sln │ └── SimpleContainmentTest │ ├── Controllers │ └── ValuesController.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── SimpleContainmentTest.csproj │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── AspNetCore3x ├── AspNetCore3xEndpoint │ ├── AspNetCore3xEndpoint.sln │ ├── AspNetCore3xEndpointSample │ │ ├── AspNetCore3xEndpointSample.csproj │ │ ├── AspNetCore3xEndpointSample.xml │ │ ├── Controllers │ │ │ ├── CustomersController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── GenericControllers.xml │ │ ├── Models │ │ │ ├── CustomerOrder.cs │ │ │ ├── CustomerOrderContext.cs │ │ │ ├── EdmModelBuilder.cs │ │ │ └── WeatherForecast.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── images │ │ └── swagger.png │ └── readme.md ├── AspNetCore3xEndpointSqlServer │ ├── AspNetCore3xEndpointSample │ │ ├── AspNetCore3xEndpointSample.csproj │ │ ├── Controllers │ │ │ └── ProductDepartmentController.cs │ │ ├── Models │ │ │ ├── EdmModelBuilder.cs │ │ │ ├── ProductDepartment.cs │ │ │ └── ProductDepartmentContext.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── AspNetCore3xEndpointSqlServer.sln │ └── readme.md ├── AspNetCore3xEndpointSqlServerExpandMany │ ├── AspNetCore3xEndpointSample │ │ ├── AspNetCore3xEndpointSample.csproj │ │ ├── Controllers │ │ │ └── ProductDepartmentController.cs │ │ ├── Models │ │ │ ├── EdmModelBuilder.cs │ │ │ ├── ProductDepartment.cs │ │ │ └── ProductDepartmentContext.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── AspNetCore3xEndpointSqlServer.sln │ └── readme.md ├── AspNetCore3xEndpointSqlServerExpandMany74beta │ ├── AspNetCore3xEndpointSample │ │ ├── AspNetCore3xEndpointSample.csproj │ │ ├── Controllers │ │ │ └── ProductDepartmentController.cs │ │ ├── Models │ │ │ ├── EdmModelBuilder.cs │ │ │ ├── ProductDepartment.cs │ │ │ └── ProductDepartmentContext.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── AspNetCore3xEndpointSqlServer.sln │ └── readme.md ├── AspNetCore3xEndpointWithSwagger │ ├── AspNetCore3xEndpoint.sln │ ├── AspNetCore3xEndpointSample │ │ ├── AspNetCore3xEndpointSample.csproj │ │ ├── AspNetCore3xEndpointSample.xml │ │ ├── Controllers │ │ │ ├── CustomersController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── GenericControllers.xml │ │ ├── Models │ │ │ ├── CustomerOrder.cs │ │ │ ├── CustomerOrderContext.cs │ │ │ ├── EdmModelBuilder.cs │ │ │ └── WeatherForecast.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── images │ │ ├── PlaySwagger.png │ │ └── swagger.png │ └── readme.md ├── AspNetCoreOData3x │ ├── AspNetCoreOData3x.sln │ ├── AspNetCoreOData3xSqlServerSample │ │ ├── AspNetCoreOData3xSqlServerSample.csproj │ │ ├── Controllers │ │ │ └── PeopleController.cs │ │ ├── Models │ │ │ └── SamMvcContext.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── FirstAspNetCoreOData3xSample │ │ ├── Controllers │ │ │ ├── CustomersController.cs │ │ │ └── ProductsController.cs │ │ ├── FirstAspNetCoreOData3xSample.csproj │ │ ├── Models │ │ │ ├── CustomerOrder.cs │ │ │ ├── CustomerOrderContext.cs │ │ │ ├── EdmModelBuilder.cs │ │ │ └── ProductCategory.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md └── EntitySetWithSpaceRouting │ ├── EntitySetWithSpaceRouting.sln │ ├── EntitySetWithSpaceRouting │ ├── Controllers │ │ ├── OrderDetailsController.cs │ │ └── WeatherForecastController.cs │ ├── EntitySetWithSpaceRouting.csproj │ ├── MyEntitySetRoutingConvention.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json │ └── readme.md ├── AspNetCoreTest ├── AspNetCoreTest.sln └── AspNetCoreTest │ ├── 35MSSharedLib1024.snk │ ├── Expression │ └── BasicExpressionTests.cs │ ├── Microsoft.AspNetCore.Test.csproj │ ├── Models │ ├── Address.cs │ ├── City.cs │ ├── Customer.cs │ ├── EdmModelBuilder.cs │ └── Order.cs │ ├── OData.Edm │ └── SelectExpandParserTests.cs │ ├── Program.cs │ └── Query │ └── SelectExpandBinderTests.cs ├── AzureFuncDemo ├── AzureFuncDemo.sln ├── AzureFuncDemo │ ├── .gitignore │ ├── AzureFuncDemo.csproj │ ├── EdmModelBuilder.cs │ ├── HttpExample.cs │ ├── ODataUriUtils.cs │ ├── Properties │ │ ├── serviceDependencies.json │ │ └── serviceDependencies.local.json │ ├── Startup.cs │ └── host.json └── readme.md ├── ContainmentApplication ├── ContainmentApplication.sln ├── ContainmentApplication │ ├── App.config │ ├── ContainmentApplication.csproj │ ├── CustomersController.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config └── Readme.md ├── CustomMetadataDocument ├── CustomMetadataDocument.sln └── CustomMetadataDocument │ ├── App.config │ ├── CustomMetadataDocument.csproj │ ├── Extensions │ ├── CustomMetadataSerializer.cs │ └── CustomSerializerProvider.cs │ ├── Models │ └── Customer.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── CustomSerializerSample ├── CustomSerializerSample.sln ├── CustomSerializerSample │ ├── App_Start │ │ └── WebApiConfig.cs │ ├── Controllers │ │ ├── CustomEntrySerializer.cs │ │ ├── CustomFeedSerializer.cs │ │ ├── CustomSerializerProvider.cs │ │ └── CustomersController.cs │ ├── CustomSerializerSample.csproj │ ├── Global.asax │ ├── Global.asax.cs │ ├── Models │ │ ├── Customer.cs │ │ └── Order.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config └── Readme.md ├── DateTimeOffsetWithEfTest ├── DateTimeOffsetWithEfTest.sln ├── DateTimeOffsetWithEfTest │ ├── App.config │ ├── Customer.cs │ ├── CustomersController.cs │ ├── DateTimeOffsetWithEfTest.csproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config └── README.md ├── DevDesign.docx ├── DollarCountOnNavigationPropertyTest ├── DollarCountOnNavigationPropertyTest.sln └── DollarCountOnNavigationPropertyTest │ ├── DollarCountOnNavigationPropertyTest.csproj │ ├── EdmModelHelper.cs │ ├── Program.cs │ └── json ├── DollarLevelSample ├── DollarLevelSample.sln └── DollarLevelSample │ ├── App.config │ ├── DollarLevelSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── TreeItem.cs │ ├── TreeItemsController.cs │ └── packages.config ├── EnumParameterTest ├── EnumParamterTest.sln └── EnumParamterTest │ ├── App.config │ ├── Customer.cs │ ├── CustomersController.cs │ ├── EnumParamterTest.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── ExpandTestInV3 ├── ExpandTestInV3.sln └── ExpandTestInV3 │ ├── App.config │ ├── Component.cs │ ├── ComponentContext.cs │ ├── ComponentsController.cs │ ├── ExpandTestInV3.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── Extensions └── Microsoft.Extensions.OData.Serializer │ ├── Microsoft.Extensions.OData.Serializer.sln │ ├── Microsoft.Extensions.OData.Serializer │ ├── InMemoryMessage.cs │ ├── Microsoft.Extensions.OData.Serializer.csproj │ └── ODataConvert.cs │ └── Test │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Test.csproj │ └── packages.config ├── InstanceAnnotationWebApiTest ├── InstanceAnnotationWebApiTest.sln ├── InstanceAnnotationWebApiTest │ ├── Controllers │ │ └── CustomersController.cs │ ├── InstanceAnnotationWebApiTest.csproj │ ├── Models │ │ ├── Address.cs │ │ └── Customer.cs │ ├── MyODataSerializerProvider.cs │ ├── MyResourceSetSerializer.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json └── readme.md ├── IssuesOnWebApi ├── Issue2180 │ ├── AppDbContext.cs │ ├── Controllers │ │ ├── CustomersController.cs │ │ └── WeatherForecastController.cs │ ├── Issue2180.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── readme.md ├── Issue2187 │ ├── Controllers │ │ └── GlobalFunctionsController.cs │ ├── Issue2187.csproj │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── readme.md ├── WebApiIssues.sln ├── issue1444_CustomSerializerProvider │ ├── Controllers │ │ ├── ODataTestController.cs │ │ └── WeatherForecastController.cs │ ├── ODataCustomODataSerializerProvider.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── TestInfoDto.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── issue1444_CustomSerializerProvider.csproj │ ├── issue1444_CustomSerializerProvider.http │ └── readme.md └── issue2045 │ ├── Controllers │ ├── InspectionDutyController.cs │ └── WeatherForecastController.cs │ ├── Models │ └── Models.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── issue2045.csproj │ └── readme.md ├── LowerCamelCaseSample ├── LowerCamelCaseSample.sln └── LowerCamelCaseSample │ ├── App.config │ ├── Controller │ └── CustomersController.cs │ ├── LowerCamelCaseSample.csproj │ ├── Model │ ├── Customer.cs │ ├── EdmModelBuilder.cs │ ├── Order.cs │ └── ServiceStatus.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── Microsoft.AspNet.OData.Test ├── Action │ └── ActionTest.cs ├── AttributeRouting │ └── EnumAsKeyAttributeRoutingTest.cs ├── CRUD │ ├── ContainmentTest.cs │ ├── NestedQueryOptionsInExpand.cs │ ├── UpdateEntityTest.cs │ └── UpdatePropertyTest.cs ├── CompositeKey │ ├── AnyController.cs │ ├── CompositeEdmModel.cs │ ├── CompositeKeyRoutingConvention.cs │ ├── CompositeKeyTest.cs │ └── DriverReleaseLifecycleDescriptionsController.cs ├── ETag │ ├── ETagTest.cs │ └── MyETagHandler.cs ├── Function │ ├── CustomFunctionResolve │ │ ├── CustomControllerRoutingConvention.cs │ │ └── CustomFunctionParameterResolveTest.cs │ └── FunctionTest.cs ├── GeneralPropertyAccess │ ├── GeneralPropertyAccessTest.cs │ ├── GeneralPropertyRoutingConvention.cs │ ├── LotOfPropertiesEntitiesController.cs │ ├── NavPropertyRoutingConvention.cs │ └── NavigationPropertyAccessTest.cs ├── Isof │ └── IsOfTest.cs ├── Microsoft.AspNet.OData.Test.csproj ├── NamespacePrefix │ └── NamesapcePrefixTest.cs ├── Properties │ └── AssemblyInfo.cs ├── TypeExtensions.cs ├── app.config └── packages.config ├── NestedFilterSample ├── NestedFilterSample.sln └── NestedFilterSample │ ├── App.config │ ├── Group.cs │ ├── GroupsController.cs │ ├── NestedFilterSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Region.cs │ ├── RegionTest.cs │ ├── RegionsController.cs │ └── packages.config ├── ODL ├── ODataReadWrite │ ├── Annotations │ │ └── ODataEdmAnnotationTests.cs │ ├── Models │ │ └── EdmModelBuilder.cs │ ├── ODataItemWrapper.cs │ ├── ODataMessageWrapper.cs │ ├── ODataNestedResourceInfoWrapper.cs │ ├── ODataReadWrite.csproj │ ├── ODataResourceSetWrapper.cs │ ├── ODataResourceWrapper.cs │ ├── Program.cs │ ├── Read │ │ └── ODataReadTest.cs │ └── Write │ │ └── ODataWriteTest.cs └── ODataRelatedTests.sln ├── ODataActionSample ├── ODataActionSample.sln ├── ODataActionSample │ ├── App_Start │ │ └── WebApiConfig.cs │ ├── Controllers │ │ └── CustomersController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Model │ │ └── Customer.cs │ ├── ODataActionSample.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── index.html │ └── packages.config └── ODataClientSample │ ├── Address.cs │ ├── App.config │ ├── Customer.cs │ ├── MyODataClient.cs │ ├── MyODataClient.tt │ ├── MyODataClient.ttinclude │ ├── ODataClientSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SerivceOperation.cs │ └── packages.config ├── ODataAttributeRoutingTest ├── ODataAttributeRoutingTest.sln └── ODataAttributeRoutingTest │ ├── App.config │ ├── Models.cs │ ├── MyController.cs │ ├── ODataAttributeRoutingTest.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── ODataByteSample ├── ODataByteSample.sln └── ODataByteSample │ ├── App.config │ ├── Customer.cs │ ├── CustomersController.cs │ ├── ODataByteSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── ODataDeltaWriterTests ├── ODataDeltaWriterTests.sln ├── ODataDeltaWriterTests │ ├── InMemoryMessage.cs │ ├── ODataDeltaWriterTests.csproj │ └── Program.cs └── readme.md ├── ODataInheritanceSample ├── ODataInheritanceSample.sln └── ODataInheritanceSample │ ├── App.config │ ├── Controllers │ └── EmployeesController.cs │ ├── Models │ ├── Address.cs │ └── Employee.cs │ ├── ODataInheritanceSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── ODataLibNetCore2 ├── MyODataLibForNetCore2 │ ├── MyEdmModelExtensions.cs │ └── MyODataLibForNetCore2.csproj ├── ODataLibNetCore2.sln └── ODataLibNetCore2 │ ├── ODataLibNetCore2.csproj │ └── Program.cs ├── ODataOWin ├── ODataOWin.sln ├── ODataOWin │ ├── App.config │ ├── Attribute.cs │ ├── ODataOWin.csproj │ ├── ProductsController.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Startup1.cs │ ├── WebApiConfig.cs │ ├── ensController.cs │ └── packages.config └── WebApi7xOWin │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Startup.cs │ ├── WebApi7xOWin.csproj │ └── packages.config ├── ODataQueryLinqExpressionBuilder ├── ODataCSharpScript │ ├── CustomerContext.cs │ ├── ODataCSharpScript.csproj │ ├── ODataFilter.cs │ ├── ODataQuery.cs │ ├── ODataSelect.cs │ ├── Program.cs │ └── QueryKind.cs ├── ODataQueryLinqExpressionBuilder.sln └── ODataQueryLinqExpressionBuilder │ ├── FilterBinder.cs │ ├── ODataCSharpScript.cs │ ├── ODataQueryLinqExpressionBuilder.csproj │ ├── Program.cs │ ├── SelectDemo.cs │ └── SelectExpand │ ├── ISelectExpandWrapper.cs │ ├── NamedPropertyNode.cs │ ├── SelectExpandWrapper.cs │ └── SelectExpandWrapperOfT.cs ├── ODataQueryNodeParserTest ├── ODataQueryNodeParserTest.sln └── ODataQueryNodeParserTest │ ├── App.config │ ├── Controllers │ └── CustomersController.cs │ ├── Models │ ├── Customer.cs │ ├── EdmModelBuilder.cs │ └── ODataQueryNode.cs │ ├── ODataQueryNodeParserTest.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── ODataSpatialSample ├── ODataSpatialSample.sln └── ODataSpatialSample │ ├── App.config │ ├── Controllers │ └── CustomersController.cs │ ├── Models │ ├── Customer.cs │ ├── EdmModelBuilder.cs │ ├── GeographyLineStringWrapper.cs │ ├── GeographyPointWrapper.cs │ └── SpatialDataContext.cs │ ├── ODataSpatialSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SpatialFactory.cs │ └── packages.config ├── ODataWithEF6Sample ├── ODataWithEF6Sample.sln └── ODataWithEF6Sample │ ├── App_Start │ └── WebApiConfig.cs │ ├── Controllers │ ├── AnyController.cs │ └── EmployeesController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Models │ ├── Address.cs │ ├── Employee.cs │ ├── Message.cs │ └── ODataWithEF6SampleContext.cs │ ├── ODataWithEF6Sample.csproj │ ├── Properties │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── index.html │ └── packages.config ├── OpenTypeSample ├── OpenTypeSample.sln └── OpenTypeSample │ ├── App.config │ ├── BooksController.cs │ ├── Models.cs │ ├── OpenTypeSample.csproj │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── packages.config ├── PatchDynamicClass.cs ├── README.md ├── ReadEdmxSelfHostOWin ├── ReadEdmxSelfHostOWin.sln ├── ReadEdmxSelfHostOWin │ ├── App.config │ ├── ClrModels.cs │ ├── EdmModel.xml │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ProtocolsController.cs │ ├── ReadEdmxSelfHostOWin.csproj │ ├── StartUp.cs │ └── packages.config └── WebApiClientApplication │ ├── App.config │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── WebApiClientApplication.csproj │ └── packages.config ├── SelfHostSample ├── OWinSelfHostServer │ ├── App.config │ ├── Customer.cs │ ├── CustomersController.cs │ ├── OWinSelfHostServer.csproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Startup.cs │ └── packages.config ├── SelfHostODataClientApp │ ├── App.config │ ├── ODataClient1.cs │ ├── ODataClient1.tt │ ├── ODataClient1.ttinclude │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SelfHostODataClientApp.csproj │ └── packages.config ├── SelfHostSample.sln ├── SelfHostServer │ ├── App.config │ ├── Controllers │ │ ├── CategoriesController.cs │ │ ├── CustomersController.cs │ │ └── OrdersController.cs │ ├── Models │ │ ├── Address.cs │ │ ├── Category.cs │ │ ├── Color.cs │ │ ├── Customer.cs │ │ ├── DataSource.cs │ │ └── Order.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SelfHostServer.csproj │ └── packages.config ├── SelfHostWebApiClientApp │ ├── App.config │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SelfHostWebApiClientApp.csproj │ └── packages.config └── SimpleODataClientApp │ ├── App.config │ ├── CommandHelper.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SimpleClientTest.cs │ ├── SimpleODataClientApp.csproj │ └── packages.config ├── SimpleODataClientTest ├── SimpleODataClientTest.sln └── SimpleODataClientTest │ ├── App.config │ ├── People.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SimpleODataClientTest.csproj │ └── packages.config ├── StackOverflow ├── Question78956264AllowDeepNavigation │ ├── Question78956264AllowDeepNavigation.sln │ ├── Question78956264AllowDeepNavigation │ │ ├── Controllers │ │ │ ├── PeopleController.cs │ │ │ ├── Services2Controller.cs │ │ │ ├── ServicesController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Extensions │ │ │ ├── BrowserInfos.cs │ │ │ ├── BrowserPropertyAttribute.cs │ │ │ ├── BrowserPropertySegment.cs │ │ │ ├── MyActionRoutingConvention.cs │ │ │ ├── NavigationKeyRoutingConvention.cs │ │ │ └── ODataBrowserPropertyBindingAttribute.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Question78956264AllowDeepNavigation.csproj │ │ ├── Question78956264AllowDeepNavigation.http │ │ ├── Service.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── Question79070582FilterNullSubChild │ ├── Question79070582FilterNullSubChild.sln │ ├── Question79070582FilterNullSubChild │ │ ├── Controllers │ │ │ ├── WeatherForecastController.cs │ │ │ └── WorkersController.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Question79070582FilterNullSubChild.csproj │ │ ├── Question79070582FilterNullSubChild.http │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md └── Question79295036AttributeRoutingWarning │ ├── Question79295036AttributeRoutingWarning.sln │ ├── Question79295036AttributeRoutingWarning │ ├── Controllers │ │ ├── MessageController.cs │ │ └── WeatherForecastController.cs │ ├── Models │ │ ├── EdmModelBuilder.cs │ │ └── MessageViewModel.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Question79295036AttributeRoutingWarning.csproj │ ├── Question79295036AttributeRoutingWarning.http │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json │ └── readme.md ├── SwaggerValidatorSample ├── SwaggerValidatorSample.sln └── SwaggerValidatorSample │ ├── App_Start │ └── WebApiConfig.cs │ ├── Controllers │ └── CustomersController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Swagger │ ├── SwaggerController.cs │ ├── SwaggerPathHandler.cs │ ├── SwaggerPathSegment.cs │ └── SwaggerRouteConvention.cs │ ├── SwaggerValidatorSample.csproj │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── TodoApi9 ├── TodoApi9.sln └── TodoApi9 │ ├── ODataEndpointFilterExtensions.cs │ ├── ODataQueryFilter.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Todo.cs │ ├── TodoApi9.csproj │ ├── TodoApi9.http │ ├── TodoDb.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── UnboundFunctionConventionRouting ├── UnboundFunctionConventionRouting.sln └── UnboundFunctionConventionRouting │ ├── App.config │ ├── Controllers │ ├── AnyController.cs │ └── CustomersController.cs │ ├── Extensions │ └── UnboundConventionRoutingConvention.cs │ ├── Models │ ├── Address.cs │ ├── Customer.cs │ ├── CustomerType.cs │ └── EdmModelBuilder.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── UnboundFunctionConventionRouting.csproj │ └── packages.config ├── UnqualifiedNameCall ├── UnqualifiedNameCall.sln └── UnqualifiedNameCall │ ├── App.config │ ├── Controllers │ └── PeopleController.cs │ ├── Models │ └── Person.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── UnqualifiedNameCall.csproj │ └── packages.config ├── UntypeSample ├── UntypeSample.sln └── UntypeSample │ ├── App.config │ ├── Controllers │ └── CustomersController.cs │ ├── Models │ └── EdmModelBuilder.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── UntypeSample.csproj │ └── packages.config ├── WKBSample ├── WKBSample.sln ├── WKBSample │ ├── AddPoint.Designer.cs │ ├── AddPoint.cs │ ├── AddPoint.resx │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── ListBoxWKBItem.cs │ ├── Program.cs │ ├── SpatialType.cs │ ├── WBK │ │ ├── BitUtils.cs │ │ ├── BitsInfo.cs │ │ ├── IWKBObject.cs │ │ ├── WKBCollection.cs │ │ ├── WKBLineString.cs │ │ ├── WKBMultiLineString.cs │ │ ├── WKBMultiPoint.cs │ │ ├── WKBMultiPolygon.cs │ │ ├── WKBObject.cs │ │ ├── WKBPoint.cs │ │ └── WKBPolygon.cs │ ├── WKBConfig.cs │ └── WKBSample.csproj └── readme.md ├── WebApiComplexTypeSkipPropertyTest ├── Readme.md ├── WebApiComplexTypeSkipPropertyTest.sln └── WebApiComplexTypeSkipPropertyTest │ ├── App.config │ ├── MyComplexTypeSerializer.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── SkipPropertyAnnotation.cs │ ├── SkipPropertyAttribute.cs │ ├── WebApiComplexTypeSkipPropertyTest.csproj │ └── packages.config ├── WebApiODataSample ├── EdmModelLib │ ├── Customer.cs │ ├── DataSource.cs │ ├── EdmModelBuilder.cs │ ├── EdmModelLib.csproj │ ├── Order.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── packages.config ├── Readme.md ├── WebApiODataSample.sln └── WebApiODataSample │ ├── App.config │ ├── Controller │ ├── CustomersController.cs │ └── OrdersController.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── WebApiODataSample.csproj │ └── packages.config ├── WebApiODataTest.sln ├── WebApiWithEFSample ├── WebApiWithEFSample.sln └── WebApiWithEFSample │ ├── App.config │ ├── EdmModelBuilder.cs │ ├── Models.cs │ ├── PeopleController.cs │ ├── Program.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── WebApiWithEFSample.csproj │ ├── WebApiWithEfContext.cs │ └── packages.config ├── issue1432DollarIt ├── issue1432DollarIt.sln ├── issue1432DollarIt │ ├── Address.cs │ ├── Controllers │ │ ├── CustomersController.cs │ │ └── WeatherForecastController.cs │ ├── Customer.cs │ ├── ModelBuilder.cs │ ├── Order.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── issue1432DollarIt.csproj │ └── issue1432DollarIt.http └── readme.md ├── v6.x ├── .vs │ └── WebApiOData6xSamples │ │ └── v15 │ │ └── sqlite3 │ │ └── storage.ide ├── AspNetClassicOData │ ├── AspNetClassicOData.sln │ ├── AspNetClassicOData │ │ ├── App_Start │ │ │ ├── BundleConfig.cs │ │ │ ├── FilterConfig.cs │ │ │ ├── RouteConfig.cs │ │ │ └── WebApiConfig.cs │ │ ├── Areas │ │ │ └── HelpPage │ │ │ │ ├── ApiDescriptionExtensions.cs │ │ │ │ ├── App_Start │ │ │ │ └── HelpPageConfig.cs │ │ │ │ ├── Controllers │ │ │ │ └── HelpController.cs │ │ │ │ ├── HelpPage.css │ │ │ │ ├── HelpPageAreaRegistration.cs │ │ │ │ ├── HelpPageConfigurationExtensions.cs │ │ │ │ ├── ModelDescriptions │ │ │ │ ├── CollectionModelDescription.cs │ │ │ │ ├── ComplexTypeModelDescription.cs │ │ │ │ ├── DictionaryModelDescription.cs │ │ │ │ ├── EnumTypeModelDescription.cs │ │ │ │ ├── EnumValueDescription.cs │ │ │ │ ├── IModelDocumentationProvider.cs │ │ │ │ ├── KeyValuePairModelDescription.cs │ │ │ │ ├── ModelDescription.cs │ │ │ │ ├── ModelDescriptionGenerator.cs │ │ │ │ ├── ModelNameAttribute.cs │ │ │ │ ├── ModelNameHelper.cs │ │ │ │ ├── ParameterAnnotation.cs │ │ │ │ ├── ParameterDescription.cs │ │ │ │ └── SimpleTypeModelDescription.cs │ │ │ │ ├── Models │ │ │ │ └── HelpPageApiModel.cs │ │ │ │ ├── SampleGeneration │ │ │ │ ├── HelpPageSampleGenerator.cs │ │ │ │ ├── HelpPageSampleKey.cs │ │ │ │ ├── ImageSample.cs │ │ │ │ ├── InvalidSample.cs │ │ │ │ ├── ObjectGenerator.cs │ │ │ │ ├── SampleDirection.cs │ │ │ │ └── TextSample.cs │ │ │ │ ├── Views │ │ │ │ ├── Help │ │ │ │ │ ├── Api.cshtml │ │ │ │ │ ├── DisplayTemplates │ │ │ │ │ │ ├── ApiGroup.cshtml │ │ │ │ │ │ ├── CollectionModelDescription.cshtml │ │ │ │ │ │ ├── ComplexTypeModelDescription.cshtml │ │ │ │ │ │ ├── DictionaryModelDescription.cshtml │ │ │ │ │ │ ├── EnumTypeModelDescription.cshtml │ │ │ │ │ │ ├── HelpPageApiModel.cshtml │ │ │ │ │ │ ├── ImageSample.cshtml │ │ │ │ │ │ ├── InvalidSample.cshtml │ │ │ │ │ │ ├── KeyValuePairModelDescription.cshtml │ │ │ │ │ │ ├── ModelDescriptionLink.cshtml │ │ │ │ │ │ ├── Parameters.cshtml │ │ │ │ │ │ ├── Samples.cshtml │ │ │ │ │ │ ├── SimpleTypeModelDescription.cshtml │ │ │ │ │ │ └── TextSample.cshtml │ │ │ │ │ ├── Index.cshtml │ │ │ │ │ └── ResourceModel.cshtml │ │ │ │ ├── Shared │ │ │ │ │ └── _Layout.cshtml │ │ │ │ ├── Web.config │ │ │ │ └── _ViewStart.cshtml │ │ │ │ └── XmlDocumentationProvider.cs │ │ ├── AspNetClassicOData.csproj │ │ ├── Content │ │ │ ├── Site.css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── Controllers │ │ │ ├── CustomersController.cs │ │ │ ├── HomeController.cs │ │ │ └── ValuesController.cs │ │ ├── Extensions │ │ │ ├── ShowHiddenResourceSerializer.cs │ │ │ └── ShowHiddenSerializerProvider.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Models │ │ │ ├── Customer.cs │ │ │ ├── ModelBuilder.cs │ │ │ └── ShowHiddenAttribute.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Scripts │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── jquery-3.4.1.intellisense.js │ │ │ ├── jquery-3.4.1.js │ │ │ ├── jquery-3.4.1.min.js │ │ │ ├── jquery-3.4.1.min.map │ │ │ ├── jquery-3.4.1.slim.js │ │ │ ├── jquery-3.4.1.slim.min.js │ │ │ ├── jquery-3.4.1.slim.min.map │ │ │ └── modernizr-2.8.3.js │ │ ├── Views │ │ │ ├── Home │ │ │ │ └── Index.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ └── _Layout.cshtml │ │ │ ├── Web.config │ │ │ └── _ViewStart.cshtml │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ ├── favicon.ico │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── packages.config │ └── readme.md ├── ModelLibrary │ ├── Address.cs │ ├── City.cs │ ├── Customer.cs │ ├── ModelLibrary.csproj │ ├── Person.cs │ └── Properties │ │ └── AssemblyInfo.cs ├── SimpleFunctionTest │ ├── SimpleFunctionTest.sln │ └── SimpleFunctionTest │ │ ├── App.config │ │ ├── Controllers │ │ └── AppsController.cs │ │ ├── Models │ │ └── App.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── SimpleFunctionTest.csproj │ │ └── packages.config ├── WebApi6xFeaturesTest │ ├── App.config │ ├── Complex │ │ └── ComplexTypeTest.cs │ ├── Dynamic │ │ ├── DynamicDollaValueTest.cs │ │ ├── DynamicDollarValueRoutingConvention.cs │ │ ├── DynamicPropertyQueryOptionTest.cs │ │ └── ODataDynamicValueMediaTypeMapping.cs │ ├── KeyAsSegment │ │ └── KeyAsSegmentTest.cs │ ├── Metadata │ │ └── MetadataTest.cs │ ├── NavigationPropertyOnComplexType │ │ ├── NavigationPropertyOnComplexTypeTest.cs │ │ └── NavigationPropertyTest.cs │ ├── Operations │ │ └── SameFunctionActionTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── QueryComplex │ │ └── QueryComplexTypeTest.cs │ ├── TypeExtensions.cs │ ├── WebApi6xFeaturesTest.csproj │ └── packages.config └── WebApiOData6xSamples.sln ├── v7.x ├── CustomODataRouting │ ├── CustomODataRouting.sln │ ├── CustomODataRouting │ │ ├── App_Start │ │ │ └── WebApiConfig.cs │ │ ├── Controllers │ │ │ └── MessagesController.cs │ │ ├── CustomODataRouting.csproj │ │ ├── Extensions │ │ │ ├── FromODataRequestBodyAttribute.cs │ │ │ ├── MyMediaFormatter.cs │ │ │ ├── MyNavigationPropertyRoutingConvention.cs │ │ │ ├── MyPerRequestParameterBinding.cs │ │ │ └── ODataMessageWrapper.cs │ │ ├── Global.asax │ │ ├── Global.asax.cs │ │ ├── Models │ │ │ └── ClrModels.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Web.Debug.config │ │ ├── Web.Release.config │ │ ├── Web.config │ │ └── packages.config │ └── Readme.md └── LocalDateTimeSample │ ├── LocalDateTimeSample.sln │ └── LocalDateTimeSample │ ├── Controllers │ └── ValuesController.cs │ ├── LocalDateTimeSample.csproj │ ├── Models │ ├── Customer.cs │ └── LocalDateTimeConverter.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── v8.x ├── AddTypeAnnotationExtensions │ ├── AddTypeAnnotationExtensions.sln │ ├── AddTypeAnnotationExtensions │ │ ├── AddTypeAnnotationExtensions.csproj │ │ ├── Controllers │ │ │ ├── CustomersController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Extensions │ │ │ ├── AddTypeAnnotationResourceSerializer.cs │ │ │ └── AddTypeAnnotationSerializerProvider.cs │ │ ├── Models │ │ │ └── Customer.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── CollectionOfCollectionUsingEdmUntyped │ ├── CollectionOfCollectionUsingEdmUntyped.sln │ ├── CollectionOfCollectionUsingEdmUntyped │ │ ├── CollectionOfCollectionUsingEdmUntyped.csproj │ │ ├── CollectionOfCollectionUsingEdmUntyped.http │ │ ├── Controllers │ │ │ ├── PlaneToDoController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Models │ │ │ ├── ModelBuilder.cs │ │ │ └── PlaneDto.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── ComputeOrderByTest │ ├── ComputeOrderByTest.sln │ ├── ComputeOrderByTest │ │ ├── ComputeOrderByTest.csproj │ │ ├── ComputeOrderByTest.http │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── CreateNewTypeSample │ ├── CreateNewTypeSample.sln │ ├── CreateNewTypeSample │ │ ├── Controllers │ │ │ ├── PeopleController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── CreateNewTypeSample.csproj │ │ ├── Extensions │ │ │ ├── EdmModelBuilder.cs │ │ │ ├── EdmTemperatureType.cs │ │ │ ├── MyPrimivieReserializer.cs │ │ │ └── MyResourceReserializer.cs │ │ ├── Models │ │ │ ├── Distance.cs │ │ │ ├── Person.cs │ │ │ └── Temperature.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── CustomizeSelectExpand │ ├── CustomizeSelectExpand.sln │ ├── CustomizeSelectExpand │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── CustomizeSelectExpand.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── DynamicRouteSample │ ├── DynamicRouteSample.sln │ ├── DynamicRouteSample │ │ ├── Controllers │ │ │ ├── Controllers.cs │ │ │ └── WeatherForecastController.cs │ │ ├── DynamicRouteSample.csproj │ │ ├── DynamicRouteSample.http │ │ ├── Extensions │ │ │ ├── ActionSelector.cs │ │ │ ├── DynamicRouteExtensions.cs │ │ │ ├── IODataModelProvider.cs │ │ │ ├── IODataRouteMatcher.cs │ │ │ ├── ODataEndpointSelectorPolicy.cs │ │ │ ├── ODataModelProvider.cs │ │ │ ├── ODataRouteAttribute.cs │ │ │ ├── ODataRouteTransformer.cs │ │ │ ├── ODataState.cs │ │ │ ├── SegmentInfo.cs │ │ │ └── SegmentKind.cs │ │ ├── Models │ │ │ ├── Address.cs │ │ │ ├── Customer.cs │ │ │ ├── DataSource.cs │ │ │ ├── EdmModelBuilder.cs │ │ │ ├── Order.cs │ │ │ └── Person.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── FilterOnTwoExpandDeepProperty │ ├── FilterOnTwoExpandDeepProperty.sln │ ├── FilterOnTwoExpandDeepProperty │ │ ├── Controllers │ │ │ ├── HandAllController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── FilterOnTwoExpandDeepProperty.csproj │ │ ├── FilterOnTwoExpandDeepProperty.http │ │ ├── Models │ │ │ ├── EdmModelBuilder.cs │ │ │ └── Models.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── FunctionTest │ ├── FunctionTest.sln │ ├── FunctionTest │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── Extensions │ │ │ ├── MyFunctionSegmentTemplate.cs │ │ │ └── ODataFunctionAttribute.cs │ │ ├── FunctionTest.csproj │ │ ├── FunctionTest.http │ │ ├── Models │ │ │ └── Customer.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── GenericControllerSample │ ├── GenericControllerSample.sln │ ├── GenericControllerSample │ │ ├── Controllers │ │ │ ├── CustomerController.cs │ │ │ ├── GenericController.cs │ │ │ ├── ODataControllerOfT.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Extensions │ │ │ ├── GenericControllerRouteConvention .cs │ │ │ ├── GenericEdmOperationRouteConvention.cs │ │ │ ├── GenericODataTemplate.cs │ │ │ ├── GenericODataTemplateWithKey.cs │ │ │ ├── MyEntityReferenceLinkDeserializer.cs │ │ │ └── TestProvider.cs │ │ ├── GenericControllerSample.csproj │ │ ├── Models │ │ │ ├── Customer.cs │ │ │ ├── ODataBuilder.cs │ │ │ └── Order.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── NullValueSample │ ├── NullValueSample.sln │ ├── NullValueSample │ │ ├── Controllers │ │ │ └── WeatherForecastController.cs │ │ ├── NullValueSample.csproj │ │ ├── NullValueSample.http │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── app.db │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── OData.Annotations.Example │ ├── Controllers │ │ └── AccountsController.cs │ ├── CustomODataResourceSerializer.cs │ ├── CustomODataSerializerProvider.cs │ ├── EdmModelBuilder.cs │ ├── OData.Annotations.Example.csproj │ ├── OData.Annotations.Example.sln │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── appsettings.Development.json │ ├── appsettings.json │ └── readme.md ├── ODataDynamicPropertiesQuery │ ├── ODataDynamicPropertiesQuery.sln │ └── ODataDynamicPropertiesQuery │ │ ├── ApplicationDbContext.cs │ │ ├── Controllers │ │ └── WeatherForecastController.cs │ │ ├── ODataDynamicPropertiesQuery.csproj │ │ ├── ODataDynamicPropertiesQuery.http │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── app.db │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── ODataDyncRouteSample │ ├── ODataDyncRouteSample.sln │ ├── ODataDyncRouteSample │ │ ├── Controllers │ │ │ ├── CommsEntityController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Models │ │ │ └── Models.cs │ │ ├── ODataDyncRouteSample.csproj │ │ ├── ODataDyncRouteSample.http │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Routing │ │ │ ├── CommsEntityControllerFeatureProvider.cs │ │ │ └── CommsEntityControllerModelConvention.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── OmitNullPropertySample │ ├── OmitNullPropertySample.sln │ └── OmitNullPropertySample │ │ ├── Controllers │ │ ├── SchoolStudentController.cs │ │ └── WeatherForecastController.cs │ │ ├── Extensions │ │ ├── OmitNullResourceSerializer.cs │ │ └── RequestExtensions.cs │ │ ├── Models │ │ ├── Address.cs │ │ ├── Color.cs │ │ ├── EdmModelBuilder.cs │ │ ├── ISchoolStudentRepository.cs │ │ ├── School.cs │ │ ├── SchoolStudentRepositoryInMemory.cs │ │ └── Student.cs │ │ ├── OmitNullPropertySample.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json ├── PermissionsAnalytics │ ├── PermissionsAnalytics.sln │ ├── PermissionsAnalytics │ │ ├── Controllers │ │ │ ├── PermissionsAnalyticsController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Extensions │ │ │ ├── GenericEntityTypeActionConvention.cs │ │ │ └── TypeCastSegementTemplate.cs │ │ ├── Models │ │ │ ├── ActionSummary.cs │ │ │ ├── AuthorizationSystemIdentity.cs │ │ │ ├── AuthorizationType.cs │ │ │ ├── CloudknoxAuthorizationSystem.cs │ │ │ ├── CloudknoxIdentity.cs │ │ │ ├── EdmModelBuilder.cs │ │ │ ├── Finding.cs │ │ │ ├── IMappingService.cs │ │ │ ├── IdentityFinding.cs │ │ │ ├── IdentityGovernance.cs │ │ │ ├── IdentitySearchProperties.cs │ │ │ ├── PermissionsAnalytics.cs │ │ │ ├── PermissionsAnalyticsAggregation.cs │ │ │ └── PermissionsCreepIndex.cs │ │ ├── PermissionsAnalytics.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── SpeakerWebApi │ ├── SpeakerWebApi.sln │ ├── SpeakerWebApi │ │ ├── Controllers │ │ │ ├── ISpeakerSubmissionsRepository.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Models │ │ │ ├── EdmModelBuilder.cs │ │ │ └── SpeakerSubmissionResource.cs │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── SpeakerWebApi.csproj │ │ ├── SpeakerWebApi.http │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── readme.md ├── TimeZoneSamples │ ├── TimeZoneSamples.sln │ └── TimeZoneSamples │ │ ├── Controllers │ │ ├── CustomersController.cs │ │ └── WeatherForecastController.cs │ │ ├── Models │ │ ├── Customer.cs │ │ └── EdmModelBuilder.cs │ │ ├── Program.cs │ │ ├── Properties │ │ └── launchSettings.json │ │ ├── TimeZoneSamples.csproj │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json └── UpdateNestedNavigationPropertySample │ ├── UpdateNestedNavigationPropertySample.sln │ ├── UpdateNestedNavigationPropertySample │ ├── Controllers │ │ ├── ClassesController.cs │ │ └── WeatherForecastController.cs │ ├── Extensions │ │ └── MyResourceDeserializer.cs │ ├── Models │ │ ├── EdmModelBuilder.cs │ │ ├── EducationClass.cs │ │ ├── EducationGradingCategory.cs │ │ └── EducationSettings.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── UpdateNestedNavigationPropertySample.csproj │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json │ └── readme.md ├── v9.x └── MinimalApiODataTest │ ├── ClientForMinimal │ ├── ClientForMinimal.csproj │ ├── Connected Services │ │ └── OData Service │ │ │ ├── ConnectedService.json │ │ │ ├── OData ServiceCsdl.xml │ │ │ └── Reference.cs │ └── Program.cs │ ├── MinimalApiODataTest.sln │ ├── MinimalApiODataTest │ ├── MinimalApiODataTest.csproj │ ├── MinimalApiODataTest.http │ ├── Models │ │ ├── Address.cs │ │ ├── AppDb.cs │ │ ├── AppDbExtension.cs │ │ ├── Color.cs │ │ ├── Customer.cs │ │ ├── EdmModelBuilder.cs │ │ └── Order.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── appsettings.Development.json │ └── appsettings.json │ └── readme.md └── vNext └── WebApiBugFix ├── WebApiBugFix.sln └── WebApiBugFix ├── App.config ├── Controllers └── ContainersController.cs ├── EdmModel.xml ├── Model └── ModelClass.cs ├── Program.cs ├── Properties └── AssemblyInfo.cs ├── WebApiBugFix.csproj └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | [Bb]in 2 | [Oo]bj 3 | [Tt]est[Rr]esults 4 | .vs 5 | /.vs 6 | *.ide 7 | *.suo 8 | *.user 9 | *.[Cc]ache 10 | *[Rr]esharper* 11 | packages 12 | NuGet.exe 13 | _[Ss]cripts 14 | *.exe 15 | *.dll 16 | *.nupkg 17 | *.dot[Cc]over 18 | *.vsp 19 | *.psess 20 | *.orig 21 | *.sln.ide -------------------------------------------------------------------------------- /AspNetCore/AnnotationEnumType/AnnotationEnumType/AnnotationEnumType.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AspNetCore/AnnotationEnumType/AnnotationEnumType/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore/AnnotationEnumType/AnnotationEnumType/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/BasicEFCoreTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicEFCoreTest.Models 7 | { 8 | public class Address 9 | { 10 | public string City { get; set; } 11 | 12 | public string Street { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/Models/Color.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicEFCoreTest.Models 7 | { 8 | public enum Color 9 | { 10 | Yellow, 11 | 12 | Blue, 13 | 14 | Green, 15 | 16 | Black, 17 | 18 | Red 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicEFCoreTest.Models 7 | { 8 | public class Customer 9 | { 10 | public int Id { get; set; } 11 | 12 | public string FirstName { get; set; } 13 | 14 | public string LastName { get; set; } 15 | 16 | public string UserName { get; set; } 17 | 18 | public int Age { get; set; } 19 | 20 | public Color FavoriateColor { get; set; } 21 | 22 | public Address HomeAddress { get; set; } 23 | 24 | public Order Order { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicEFCoreTest.Models 7 | { 8 | public class Order 9 | { 10 | public int Id { get; set; } 11 | 12 | public decimal Price { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore/BasicEFCoreTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiFxSample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="BasicWebApiFxSample.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiFxSample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Routing; 7 | 8 | namespace BasicWebApiFxSample 9 | { 10 | public class WebApiApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/BasicWebApiSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicWebApiSample.Models 7 | { 8 | public class Address 9 | { 10 | public string City { get; set; } 11 | 12 | public string Street { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/Models/Color.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicWebApiSample.Models 7 | { 8 | public enum Color 9 | { 10 | Red, 11 | 12 | Yellow, 13 | 14 | Blue, 15 | 16 | Green, 17 | 18 | Black 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/Models/CustomerOrderContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace BasicWebApiSample.Models 4 | { 5 | public class CustomerOrderContext : DbContext 6 | { 7 | public CustomerOrderContext(DbContextOptions options) 8 | : base(options) 9 | { 10 | 11 | } 12 | 13 | public DbSet Customers { get; set; } 14 | 15 | public DbSet Orders { get; set; } 16 | 17 | protected override void OnModelCreating(ModelBuilder modelBuilder) 18 | { 19 | modelBuilder.Entity().OwnsOne(c => c.HomeAddress); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BasicWebApiSample.Models 7 | { 8 | public class Order 9 | { 10 | public int Id { get; set; } 11 | 12 | public decimal Price { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore/BasicWebApiSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore/FunctionCallTest/FunctionCallTest/Controllers/EngagementController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.OData; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace FunctionCallTest.Controllers 9 | { 10 | public class EngagementController : ODataController 11 | { 12 | [HttpGet] 13 | public string GetEngagementAlertsMetrics(int key, int engagementId, Guid userId, int days) 14 | { 15 | return $"In Engagement({key}).GetEngagementAlertsMetrics({engagementId},{userId},{days})"; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AspNetCore/FunctionCallTest/FunctionCallTest/FunctionCallTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /AspNetCore/FunctionCallTest/FunctionCallTest/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FunctionCallTest 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore/FunctionCallTest/FunctionCallTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore/FunctionCallTest/FunctionCallTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore/OptionalParameterSample/OptionalParameterSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore/OptionalParameterSample/OptionalParameterSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /AspNetCore/OrderbyTest/OrderbyTest/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace OrderbyTest.Models 7 | { 8 | public class Address 9 | { 10 | public string Street { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /AspNetCore/OrderbyTest/OrderbyTest/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace OrderbyTest.Models 7 | { 8 | public class Customer 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public MyComplexType Value { get; set; } 15 | 16 | public IList
Locations { get; set; } 17 | 18 | public IList Orders { get; set; } 19 | } 20 | 21 | public class SpecialCustomer : Customer 22 | { 23 | public string Token { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AspNetCore/OrderbyTest/OrderbyTest/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace OrderbyTest.Models 7 | { 8 | public class Order 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | } 14 | 15 | public class SpecialOrder : Order 16 | { 17 | public int Price { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AspNetCore/OrderbyTest/OrderbyTest/OrderbyTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AspNetCore/OrderbyTest/OrderbyTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore/OrderbyTest/OrderbyTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore/SimpleContainmentTest/SimpleContainmentTest/SimpleContainmentTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /AspNetCore/SimpleContainmentTest/SimpleContainmentTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore/SimpleContainmentTest/SimpleContainmentTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpoint/AspNetCore3xEndpointSample/AspNetCore3xEndpointSample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AspNetCore3xEndpointSample 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpoint/AspNetCore3xEndpointSample/GenericControllers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | CustomersController 5 | 6 | 7 | 8 | 9 | Retrieve all customers 10 | 11 | 12 | 13 | 14 | Retrieve a resources 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpoint/AspNetCore3xEndpointSample/Models/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. See License.txt in the project root for license information. 3 | 4 | using System; 5 | 6 | namespace AspNetCore3xEndpointSample.Models 7 | { 8 | public class WeatherForecast 9 | { 10 | public DateTime Date { get; set; } 11 | 12 | public int TemperatureC { get; set; } 13 | 14 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 15 | 16 | public string Summary { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpoint/AspNetCore3xEndpointSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpoint/AspNetCore3xEndpointSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpoint/images/swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/AspNetCore3x/AspNetCore3xEndpoint/images/swagger.png -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServer/AspNetCore3xEndpointSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServer/AspNetCore3xEndpointSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SamProductAndDepartmentTest;Integrated Security=True" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServer/readme.md: -------------------------------------------------------------------------------- 1 | # ASP.NET Core OData Endpoint routing on ASP.NET Core 3.1, 2 | 3 | ## Introduction 4 | 5 | It's a very simple ASP.NET Core OData Web Application. It targets to ASP.NET Core 3.1!! 6 | 7 | **It supports Endpoint routing introduced in ASP.NET Core.** 8 | 9 | ## OData package 10 | 11 | It's using ASP.NET Core OData 7.4.0-beta package at: 12 | 13 | https://www.nuget.org/packages/Microsoft.AspNetCore.OData/7.4.0-beta 14 | 15 | 16 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServerExpandMany/AspNetCore3xEndpointSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServerExpandMany/AspNetCore3xEndpointSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SamProductDepartmentExpandCollectTest;Integrated Security=True" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServerExpandMany/readme.md: -------------------------------------------------------------------------------- 1 | # ASP.NET Core OData Endpoint routing on ASP.NET Core 3.1, 2 | 3 | ## Introduction 4 | 5 | It's a very simple ASP.NET Core OData Web Application. It targets to ASP.NET Core 3.1!! 6 | 7 | **It supports Endpoint routing introduced in ASP.NET Core.** 8 | 9 | ## OData package 10 | 11 | It's using ASP.NET Core OData 7.4.0-beta package at: 12 | 13 | https://www.nuget.org/packages/Microsoft.AspNetCore.OData/7.4.0-beta 14 | 15 | 16 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServerExpandMany74beta/AspNetCore3xEndpointSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServerExpandMany74beta/AspNetCore3xEndpointSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SamProductDepartmentExpandCollectTest;Integrated Security=True" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointSqlServerExpandMany74beta/readme.md: -------------------------------------------------------------------------------- 1 | # ASP.NET Core OData Endpoint routing on ASP.NET Core 3.1, 2 | 3 | ## Introduction 4 | 5 | It's a very simple ASP.NET Core OData Web Application. It targets to ASP.NET Core 3.1!! 6 | 7 | **It supports Endpoint routing introduced in ASP.NET Core.** 8 | 9 | ## OData package 10 | 11 | It's using ASP.NET Core OData 7.4.0-beta package at: 12 | 13 | https://www.nuget.org/packages/Microsoft.AspNetCore.OData/7.4.0-beta 14 | 15 | 16 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/AspNetCore3xEndpointSample/AspNetCore3xEndpointSample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AspNetCore3xEndpointSample 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/AspNetCore3xEndpointSample/GenericControllers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | AspNetCore3xEndpointSample 5 | 6 | 7 | 8 | 9 | Retrieve all customers 10 | 11 | 12 | 13 | 14 | Retrieve a resources 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/AspNetCore3xEndpointSample/Models/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. All rights reserved. 2 | // Licensed under the MIT License. See License.txt in the project root for license information. 3 | 4 | using System; 5 | 6 | namespace AspNetCore3xEndpointSample.Models 7 | { 8 | public class WeatherForecast 9 | { 10 | public DateTime Date { get; set; } 11 | 12 | public int TemperatureC { get; set; } 13 | 14 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 15 | 16 | public string Summary { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/AspNetCore3xEndpointSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/AspNetCore3xEndpointSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/images/PlaySwagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/AspNetCore3x/AspNetCore3xEndpointWithSwagger/images/PlaySwagger.png -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCore3xEndpointWithSwagger/images/swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/AspNetCore3x/AspNetCore3xEndpointWithSwagger/images/swagger.png -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCoreOData3x/AspNetCoreOData3xSqlServerSample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AspNetCoreOData3xSqlServerSample 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCoreOData3x/AspNetCoreOData3xSqlServerSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCoreOData3x/AspNetCoreOData3xSqlServerSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "ConnectionStrings": { 11 | "MvcMovieContext": "Server=(localdb)\\mssqllocaldb;Database=SqlServerSampleDb;Trusted_Connection=True;" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCoreOData3x/FirstAspNetCoreOData3xSample/FirstAspNetCoreOData3xSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCoreOData3x/FirstAspNetCoreOData3xSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/AspNetCoreOData3x/FirstAspNetCoreOData3xSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore3x/EntitySetWithSpaceRouting/EntitySetWithSpaceRouting/Controllers/OrderDetailsController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.OData; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace EntitySetWithSpaceRouting.Controllers 9 | { 10 | public class OrderDetailsController : ODataController 11 | { 12 | [EnableQuery] 13 | public IActionResult Get() 14 | { 15 | return Ok("Here's any things"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AspNetCore3x/EntitySetWithSpaceRouting/EntitySetWithSpaceRouting/EntitySetWithSpaceRouting.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /AspNetCore3x/EntitySetWithSpaceRouting/EntitySetWithSpaceRouting/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EntitySetWithSpaceRouting 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AspNetCore3x/EntitySetWithSpaceRouting/EntitySetWithSpaceRouting/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspNetCore3x/EntitySetWithSpaceRouting/EntitySetWithSpaceRouting/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /AspNetCore3x/EntitySetWithSpaceRouting/readme.md: -------------------------------------------------------------------------------- 1 | # Customize the convention routing 2 | 3 | ## Introduction 4 | 5 | The entity set name has white space. 6 | 7 | 8 | ## Customize the convention routing 9 | 10 | Implement `IODataRoutingConvention` to map the request to the controller. 11 | 12 | ## Test 13 | 14 | Send `~/odata/Order Details` 15 | 16 | you will get the response with following payload: 17 | 18 | ```json 19 | { 20 | "@odata.context": "http://localhost:5000/odata/$metadata#Edm.String", 21 | "value": "Here's any things" 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /AspNetCoreTest/AspNetCoreTest/35MSSharedLib1024.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/AspNetCoreTest/AspNetCoreTest/35MSSharedLib1024.snk -------------------------------------------------------------------------------- /AspNetCoreTest/AspNetCoreTest/Models/City.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace NS 6 | { 7 | public class City 8 | { 9 | public int Id { get; set; } 10 | 11 | public int CityName { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AspNetCoreTest/AspNetCoreTest/Models/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.OData.Builder; 2 | using Microsoft.OData.Edm; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace NS 8 | { 9 | public class EdmModelBuilder 10 | { 11 | public static IEdmModel GetEdmModel() 12 | { 13 | var builder = new ODataConventionModelBuilder(); 14 | builder.EntitySet("Customers"); 15 | builder.EntitySet("Orders"); 16 | builder.EntitySet("Cities"); 17 | 18 | return builder.GetEdmModel(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AspNetCoreTest/AspNetCoreTest/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace NS 6 | { 7 | public class Order 8 | { 9 | public int Id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AspNetCoreTest/AspNetCoreTest/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AspNetCoreTest 4 | { 5 | class Program 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /AzureFuncDemo/AzureFuncDemo/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "type": "appInsights" 5 | }, 6 | "storage1": { 7 | "type": "storage", 8 | "connectionId": "AzureWebJobsStorage" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /AzureFuncDemo/AzureFuncDemo/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "appInsights1": { 4 | "type": "appInsights.sdk" 5 | }, 6 | "storage1": { 7 | "type": "storage.emulator", 8 | "connectionId": "AzureWebJobsStorage" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /AzureFuncDemo/AzureFuncDemo/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Azure.Functions.Extensions.DependencyInjection; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNet.OData.Extensions; 8 | 9 | [assembly:FunctionsStartup(typeof(AzureFuncDemo.Startup))] 10 | 11 | namespace AzureFuncDemo 12 | { 13 | public class Startup : FunctionsStartup 14 | { 15 | public override void Configure(IFunctionsHostBuilder builder) 16 | { 17 | builder.Services.AddOData(); // it seems this is not required. 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AzureFuncDemo/AzureFuncDemo/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": true, 7 | "excludedTypes": "Request" 8 | } 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /ContainmentApplication/ContainmentApplication/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ContainmentApplication/Readme.md: -------------------------------------------------------------------------------- 1 |  2 | ==================== 3 | Test the Query/Update/Delete the containment 4 | ==================== 5 | 6 | -------------------------------------------------------------------------------- /CustomMetadataDocument/CustomMetadataDocument/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /CustomMetadataDocument/CustomMetadataDocument/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CustomMetadataDocument.Models 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /CustomSerializerSample/CustomSerializerSample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="CustomSerializerSample.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /CustomSerializerSample/CustomSerializerSample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Routing; 7 | 8 | namespace CustomSerializerSample 9 | { 10 | public class WebApiApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /CustomSerializerSample/CustomSerializerSample/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace CustomSerializerSample.Models 7 | { 8 | public class Customer 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public IList Orders { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /CustomSerializerSample/CustomSerializerSample/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace CustomSerializerSample.Models 7 | { 8 | public class Order 9 | { 10 | public int Id { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /DateTimeOffsetWithEfTest/DateTimeOffsetWithEfTest/CustomersController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Web.Http; 7 | using System.Web.OData; 8 | 9 | namespace DateTimeOffsetWithEfTest 10 | { 11 | public class CustomersController : ODataController 12 | { 13 | private CustomerContext _db = new CustomerContext(); 14 | 15 | [EnableQuery] 16 | public IHttpActionResult Get() 17 | { 18 | return Ok(_db.Customers); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DateTimeOffsetWithEfTest/README.md: -------------------------------------------------------------------------------- 1 | ==================== 2 | Test DateTime, DateTimeOffset, smalldatetime with EF 3 | ==================== 4 | 5 | The DB created by CODE FIRST from EF is: 6 | 7 | ```SQL 8 | CREATE TABLE [dbo].[Customers] ( 9 | [Id] INT IDENTITY (1, 1) NOT NULL, 10 | [Name] NVARCHAR (MAX) NULL, 11 | [Birthday] SMALLDATETIME NOT NULL, 12 | [ExpirationDate] DATETIMEOFFSET (7) NOT NULL, 13 | CONSTRAINT [PK_dbo.Customers] PRIMARY KEY CLUSTERED ([Id] ASC) 14 | ); 15 | ``` 16 | 17 | Thanks. 18 | Sam. 19 | 20 | -------------------------------------------------------------------------------- /DevDesign.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/DevDesign.docx -------------------------------------------------------------------------------- /DollarCountOnNavigationPropertyTest/DollarCountOnNavigationPropertyTest/DollarCountOnNavigationPropertyTest.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DollarCountOnNavigationPropertyTest/DollarCountOnNavigationPropertyTest/EdmModelHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace DollarCountOnNavigationPropertyTest 8 | { 9 | internal class EdmModelHelper 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /DollarCountOnNavigationPropertyTest/DollarCountOnNavigationPropertyTest/Program.cs: -------------------------------------------------------------------------------- 1 | // See https://aka.ms/new-console-template for more information 2 | Console.WriteLine("Hello, World!"); 3 | -------------------------------------------------------------------------------- /DollarCountOnNavigationPropertyTest/DollarCountOnNavigationPropertyTest/json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/DollarCountOnNavigationPropertyTest/DollarCountOnNavigationPropertyTest/json -------------------------------------------------------------------------------- /DollarLevelSample/DollarLevelSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DollarLevelSample/DollarLevelSample/TreeItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace DollarLevelSample 8 | { 9 | public class TreeItem 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public List Children { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /EnumParameterTest/EnumParamterTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /EnumParameterTest/EnumParamterTest/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EnumParamterTest 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public Category Category { get; set; } 16 | } 17 | 18 | public enum Category 19 | { 20 | Vip, 21 | General 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /EnumParameterTest/EnumParamterTest/CustomersController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Web.Http; 7 | using System.Web.OData; 8 | using System.Web.OData.Routing; 9 | 10 | namespace EnumParamterTest 11 | { 12 | public class CustomersController : ODataController 13 | { 14 | [HttpGet] 15 | [ODataRoute("GetCountByCategory(category={category})")] 16 | public IHttpActionResult GetCountByCategory([FromODataUri] Category category) 17 | { 18 | return Ok(category); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ExpandTestInV3/ExpandTestInV3/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Extensions/Microsoft.Extensions.OData.Serializer/Microsoft.Extensions.OData.Serializer/Microsoft.Extensions.OData.Serializer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /InstanceAnnotationWebApiTest/InstanceAnnotationWebApiTest/InstanceAnnotationWebApiTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /InstanceAnnotationWebApiTest/InstanceAnnotationWebApiTest/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.OData.Builder; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace InstanceAnnotationWebApiTest.Models 8 | { 9 | public class Address 10 | { 11 | public string Street { get; set; } 12 | 13 | public string City { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /InstanceAnnotationWebApiTest/InstanceAnnotationWebApiTest/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.OData.Builder; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace InstanceAnnotationWebApiTest.Models 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public Address HomeAddress { get; set; } 16 | 17 | public IDictionary Dynamics { get; set; } 18 | 19 | public IODataInstanceAnnotationContainer Container { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /InstanceAnnotationWebApiTest/InstanceAnnotationWebApiTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /InstanceAnnotationWebApiTest/InstanceAnnotationWebApiTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2180/AppDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Issue2180 8 | { 9 | public class AppDbContext : DbContext 10 | { 11 | public AppDbContext(DbContextOptions options) 12 | : base(options) 13 | { 14 | } 15 | 16 | public DbSet Customers { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2180/Issue2180.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2180/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Issue2180 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2180/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2180/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=WebApiIssue2080Test;Integrated Security=True" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft": "Warning", 9 | "Microsoft.Hosting.Lifetime": "Information" 10 | } 11 | }, 12 | "AllowedHosts": "*" 13 | } 14 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2180/readme.md: -------------------------------------------------------------------------------- 1 | It's an investigation sampel for https://github.com/OData/WebApi/issues/2180 2 | 3 | Run it, and send Get request as; 4 | 5 | http://localhost:5000/odata/Customers?$filter=Color in ('Red','Blue') 6 | 7 | you will get: 8 | 9 | ```json 10 | { 11 | "@odata.context": "http://localhost:5000/odata/$metadata#Customers", 12 | "value": [ 13 | { 14 | "Id": 1, 15 | "Color": "Red" 16 | }, 17 | { 18 | "Id": 2, 19 | "Color": "Blue" 20 | } 21 | ] 22 | } 23 | 24 | ``` 25 | 26 | It's using 7.4.1 version. 27 | 28 | 29 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2187/Issue2187.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2187/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2187/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /IssuesOnWebApi/Issue2187/readme.md: -------------------------------------------------------------------------------- 1 | It's an investigation sampel for https://github.com/OData/WebApi/issues/2187 2 | 3 | Run it, and send Get request as; 4 | 5 | http://localhost:5000/odata/SayAnything(value='Bueller',repeat=4) 6 | 7 | Bueller ... Bueller ... Bueller ... Bueller 8 | 9 | 10 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/Controllers/ODataTestController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.OData.Routing.Controllers; 3 | 4 | namespace issue1444_CustomSerializerProvider.Controllers; 5 | 6 | public class ODataTestController : ODataController 7 | { 8 | [HttpGet("odata/GetTest()")] 9 | public IActionResult GetTest() 10 | { 11 | var a = new Dictionary>(); 12 | a.Add(10, new List() { 20, 20, 20 }); 13 | a.Add(20, new List() { 30, 30, 30 }); 14 | 15 | return Ok(new TestInfoDto() { GroupTypes = a }); 16 | } 17 | } -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5243", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/TestInfoDto.cs: -------------------------------------------------------------------------------- 1 | // Configure the HTTP request pipeline. 2 | 3 | 4 | 5 | 6 | 7 | public class TestInfoDto 8 | { 9 | public Dictionary> GroupTypes { get; set; } = new Dictionary>(); 10 | } -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace issue1444_CustomSerializerProvider 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/issue1444_CustomSerializerProvider.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue1444_CustomSerializerProvider/issue1444_CustomSerializerProvider.http: -------------------------------------------------------------------------------- 1 | @issue1444_CustomSerializerProvider_HostAddress = http://localhost:5243 2 | 3 | GET {{issue1444_CustomSerializerProvider_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue2045/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace issue2045 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue2045/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue2045/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /IssuesOnWebApi/issue2045/issue2045.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /LowerCamelCaseSample/LowerCamelCaseSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LowerCamelCaseSample/LowerCamelCaseSample/Model/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LowerCamelCaseSample 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public ServiceStatus Status { get; set; } 14 | 15 | public Color Color { get; set; } 16 | 17 | public Order Order { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LowerCamelCaseSample/LowerCamelCaseSample/Model/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace LowerCamelCaseSample 8 | { 9 | public class Order 10 | { 11 | public int Id { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LowerCamelCaseSample/LowerCamelCaseSample/Model/ServiceStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Runtime.Serialization; 7 | 8 | namespace LowerCamelCaseSample 9 | { 10 | public enum ServiceStatus 11 | { 12 | Active = 1, 13 | Sleep = 2, 14 | ShutDown = 3, 15 | Broken = 4 16 | } 17 | 18 | [DataContract(Name = "color")] 19 | public enum Color 20 | { 21 | Red, 22 | Blue, 23 | Green 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Microsoft.AspNet.OData.Test/GeneralPropertyAccess/LotOfPropertiesEntitiesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Web.Http; 7 | using System.Web.OData; 8 | using System.Web.OData.Routing; 9 | using Xunit; 10 | 11 | namespace Microsoft.AspNet.OData.Test.GeneralPropertyAccess 12 | { 13 | public class LotOfPropertiesEntitiesController : ODataController 14 | { 15 | [HttpGet] 16 | public IHttpActionResult ReturnPropertyValue(int key, string propertyName) 17 | { 18 | return Ok(propertyName); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /NestedFilterSample/NestedFilterSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ODL/ODataReadWrite/ODataItemWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ODataReadWrite 6 | { 7 | abstract class ODataItemWrapper 8 | { 9 | public abstract void Append(ODataItemWrapper newItem); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ODL/ODataReadWrite/ODataReadWrite.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net8.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ODL/ODataReadWrite/Program.cs: -------------------------------------------------------------------------------- 1 | using ODataReadWrite.Read; 2 | using ODataReadWrite.Write; 3 | using System; 4 | 5 | namespace ODataReadWrite 6 | { 7 | class Program 8 | { 9 | static void Main(string[] args) 10 | { 11 | ODataReadTest.TestReadResource(); 12 | 13 | Console.WriteLine("Hello World!"); 14 | 15 | ODataWriteTest.TestWriting(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ODataActionSample/ODataActionSample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="ODataActionSample.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /ODataActionSample/ODataActionSample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Routing; 7 | 8 | namespace ODataActionSample 9 | { 10 | public class WebApiApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /ODataActionSample/ODataClientSample/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ODataActionSample/ODataClientSample/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ODataAttributeRoutingTest/ODataAttributeRoutingTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ODataAttributeRoutingTest/ODataAttributeRoutingTest/Models.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataAttributeRoutingTest 8 | { 9 | public class Restaurant 10 | { 11 | public int Id { get; set; } 12 | 13 | public IEnumerable ResDishes { get; set; } 14 | } 15 | 16 | public class Dish 17 | { 18 | public int Id { get; set; } 19 | 20 | public string Name { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ODataByteSample/ODataByteSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ODataByteSample/ODataByteSample/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.CompilerServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ODataByteSample 9 | { 10 | public class Customer 11 | { 12 | public int Id { get; set; } 13 | 14 | public byte[] Content { get; set; } 15 | 16 | public IEnumerable Bytes { get; set; } 17 | 18 | public ICollection Contents { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ODataDeltaWriterTests/ODataDeltaWriterTests/ODataDeltaWriterTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ODataInheritanceSample/ODataInheritanceSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ODataInheritanceSample/ODataInheritanceSample/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ModelsNS 8 | { 9 | public class Address 10 | { 11 | public string City { get; set; } 12 | 13 | public string Street { get; set; } 14 | } 15 | 16 | public class CnAddress : Address 17 | { 18 | public string PostCode { get; set; } 19 | } 20 | 21 | public class UsAddress : Address 22 | { 23 | public string ZipCode { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ODataInheritanceSample/ODataInheritanceSample/Models/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ModelsNS 8 | { 9 | public class Employee 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public Address Address { get; set; } 16 | } 17 | 18 | public class Manager : Employee 19 | { 20 | public decimal Salary { get; set; } 21 | } 22 | 23 | public class Seller : Employee 24 | { 25 | public double Bonus { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ODataLibNetCore2/MyODataLibForNetCore2/MyODataLibForNetCore2.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ODataLibNetCore2/ODataLibNetCore2/ODataLibNetCore2.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.1 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ODataOWin/ODataOWin/Attribute.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.Edm.Csdl; 3 | using System; 4 | 5 | namespace ODataOWin 6 | { 7 | [AttributeUsage(AttributeTargets.Property)] 8 | public class DefaultSelectAttribute : Attribute 9 | { 10 | } 11 | 12 | [AttributeUsage(AttributeTargets.Property)] 13 | public class DefaultHiddenAttribute : Attribute 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ODataOWin/ODataOWin/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin.Hosting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ODataOWin 9 | { 10 | class Program 11 | { 12 | static void Main(string[] args) 13 | { 14 | using (WebApp.Start("http://localhost:12345")) 15 | { 16 | Console.WriteLine("Query at http://localhost:12345 \n" + 17 | "Press [enter] to quit ..."); 18 | Console.ReadLine(); 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ODataOWin/ODataOWin/ensController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Web.Http; 7 | using System.Web.OData; 8 | 9 | namespace ODataOWin 10 | { 11 | public class ensController : ODataController 12 | { 13 | [EnableQuery] 14 | public IHttpActionResult F8(int key) 15 | { 16 | return Ok(key); 17 | } 18 | 19 | [EnableQuery] 20 | public IHttpActionResult Post(Application app) 21 | { 22 | return Created(app); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ODataOWin/WebApi7xOWin/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin.Hosting; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebApi7xOWin 9 | { 10 | class Program 11 | { 12 | static void Main(string[] args) 13 | { 14 | string baseUri = "http://localhost:53234"; 15 | 16 | using (WebApp.Start(url: baseUri)) 17 | { 18 | Console.WriteLine("Service is running http://localhost:53234. Press any key to quit ...."); 19 | Console.ReadKey(); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataCSharpScript/ODataCSharpScript.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | disable 7 | disable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataCSharpScript/ODataQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataCSharpScript 8 | { 9 | internal abstract class ODataQuery 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataCSharpScript/QueryKind.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataCSharpScript 8 | { 9 | internal enum QueryKind 10 | { 11 | Filter, 12 | Select, 13 | Expand, 14 | Top, 15 | Skip, 16 | Orderby 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataQueryLinqExpressionBuilder/ODataCSharpScript.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.CodeAnalysis.CSharp.Scripting; 7 | 8 | namespace ODataQueryLinqExpressionBuilder 9 | { 10 | internal class ODataCSharpScript 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataQueryLinqExpressionBuilder/SelectExpand/ISelectExpandWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataQueryLinqExpressionBuilder.SelectExpand 8 | { 9 | public interface ISelectExpandWrapper 10 | { 11 | IDictionary ToDictionary(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataQueryLinqExpressionBuilder/SelectExpand/NamedPropertyNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataQueryLinqExpressionBuilder.SelectExpand 8 | { 9 | public class NamedPropertyNode 10 | { 11 | public NamedPropertyNode Next { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataQueryLinqExpressionBuilder/SelectExpand/SelectExpandWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataQueryLinqExpressionBuilder.SelectExpand 8 | { 9 | internal abstract class SelectExpandWrapper : ISelectExpandWrapper 10 | { 11 | public virtual IDictionary ToDictionary() 12 | { 13 | throw new NotImplementedException(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ODataQueryLinqExpressionBuilder/ODataQueryLinqExpressionBuilder/SelectExpand/SelectExpandWrapperOfT.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataQueryLinqExpressionBuilder.SelectExpand 8 | { 9 | internal class SelectExpandWrapper : SelectExpandWrapper 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ODataQueryNodeParserTest/ODataQueryNodeParserTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ODataQueryNodeParserTest/ODataQueryNodeParserTest/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ODataQueryNodeParserTest.Models 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public DateTimeOffset CreatedOn { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ODataSpatialSample/ODataSpatialSample/Models/SpatialDataContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ODataSpatialSample.Models 9 | { 10 | public class SpatialDataContext : DbContext 11 | { 12 | public DbSet Customers { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="ODataWithEF6Sample.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Routing; 7 | 8 | namespace ODataWithEF6Sample 9 | { 10 | public class WebApiApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace ODataWithEF6Sample.Models 7 | { 8 | public class Address 9 | { 10 | public int Id { get; set; } 11 | 12 | public string AddressLine1 { get; set; } 13 | 14 | public string AddressLine2 { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/Models/Employee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace ODataWithEF6Sample.Models 7 | { 8 | public class Employee 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public int AddressId { get; set; } 15 | 16 | public Address Address { get; set; } 17 | 18 | public ICollection Messages { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/Models/Message.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace ODataWithEF6Sample.Models 7 | { 8 | public class Message 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public Message Msg { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/Models/ODataWithEF6SampleContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace ODataWithEF6Sample.Models 8 | { 9 | public class ODataWithEf6SampleContext : DbContext 10 | { 11 | public IDbSet Employees { get; set; } 12 | 13 | public IDbSet Messages { get; set; } 14 | 15 | public IDbSet
Addresses { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /ODataWithEF6Sample/ODataWithEF6Sample/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | OData Sample with EF 6 5 | 6 | 7 | OData Expand override Entity Framework includes 8 | 9 | 10 | -------------------------------------------------------------------------------- /OpenTypeSample/OpenTypeSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OpenTypeSample/OpenTypeSample/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Web Api Samples 3 | 4 | --- 5 | This repository is my repository in which many OData Web API samples are created/updated to test many scenarios related to OData, OData Web API. 6 | 7 | All codes are added for testing. So, No quality guarantee and no copyright. And you can feel free to reuse it. 8 | 9 | Of course, I'll be very happy if you can give me some feedback. 10 | 11 | Besides, you can send me an email (saxu@microsoft.com) for any questions related to OData, OData Web API. 12 | 13 | ---- 14 | Update to use 'main' as the default branch name. 01/24/2022 15 | 16 | Thanks. 17 | Sam. 18 | 19 | -------------------------------------------------------------------------------- /ReadEdmxSelfHostOWin/WebApiClientApplication/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ReadEdmxSelfHostOWin/WebApiClientApplication/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /SelfHostSample/OWinSelfHostServer/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace OWinSelfHostServer 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | public string Name { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SelfHostSample/OWinSelfHostServer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Owin.Hosting; 7 | 8 | namespace OWinSelfHostServer 9 | { 10 | class Program 11 | { 12 | static void Main(string[] args) 13 | { 14 | string baseUri = "http://localhost:54321"; 15 | 16 | using (WebApp.Start(url: baseUri)) 17 | { 18 | Console.WriteLine("Service is running http://localhost:54321. Press any key to quit...."); 19 | Console.ReadKey(); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostODataClientApp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostODataClientApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostServer/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SelfHostServer.Models 8 | { 9 | public class Address 10 | { 11 | public string Country { get; set; } 12 | 13 | public string City { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostServer/Models/Category.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SelfHostServer.Models 8 | { 9 | public class Category 10 | { 11 | public int CategoryId { get; set; } 12 | 13 | public string CategoryType { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostServer/Models/Color.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SelfHostServer.Models 8 | { 9 | public enum Color 10 | { 11 | Red, 12 | Green, 13 | Blue, 14 | Yellow, 15 | Black, 16 | Pink, 17 | Purple 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostServer/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SelfHostServer.Models 8 | { 9 | public class Customer 10 | { 11 | public int CustomerId { get; set; } 12 | 13 | public string CustomerName { get; set; } 14 | 15 | public Color FavoriteColor { get; set; } 16 | 17 | public Address Location { get; set; } 18 | 19 | public Category Category { get; set; } 20 | 21 | public ICollection Orders { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostServer/Models/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SelfHostServer.Models 8 | { 9 | public class Order 10 | { 11 | public int OrderId { get; set; } 12 | 13 | public string OrderName { get; set; } 14 | 15 | public IDictionary Properties { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostWebApiClientApp/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SelfHostSample/SelfHostWebApiClientApp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/Controllers/PeopleController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | 3 | namespace Question78956264AllowDeepNavigation.Controllers; 4 | 5 | public class PeopleController : Controller 6 | { 7 | public IActionResult List(string ssn) 8 | { 9 | return Ok(ssn); 10 | } 11 | 12 | public IActionResult Get(string odataPath) 13 | { 14 | return Ok(odataPath); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/Extensions/BrowserPropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Question78956264AllowDeepNavigation.Extensions; 2 | 3 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 4 | public class BrowserPropertyAttribute : Attribute { } 5 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation.http: -------------------------------------------------------------------------------- 1 | @Question78956264AllowDeepNavigation_HostAddress = http://localhost:5044 2 | 3 | GET {{Question78956264AllowDeepNavigation_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace Question78956264AllowDeepNavigation 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /StackOverflow/Question78956264AllowDeepNavigation/Question78956264AllowDeepNavigation/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /StackOverflow/Question79070582FilterNullSubChild/Question79070582FilterNullSubChild/Question79070582FilterNullSubChild.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /StackOverflow/Question79070582FilterNullSubChild/Question79070582FilterNullSubChild/Question79070582FilterNullSubChild.http: -------------------------------------------------------------------------------- 1 | @Question79070582FilterNullSubChild_HostAddress = http://localhost:5269 2 | 3 | GET {{Question79070582FilterNullSubChild_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /StackOverflow/Question79070582FilterNullSubChild/Question79070582FilterNullSubChild/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /StackOverflow/Question79070582FilterNullSubChild/Question79070582FilterNullSubChild/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/Models/MessageViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Question79295036AttributeRoutingWarning.Models; 2 | 3 | public class MessageViewModel 4 | { 5 | public int Id { get; set; } 6 | } 7 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.OData; 2 | using Question79295036AttributeRoutingWarning.Models; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers() 9 | .AddOData(opt => opt.AddRouteComponents("odata", EdmModelBuilder.GetEdmModel())); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseAuthorization(); 16 | 17 | app.UseODataRouteDebug(); 18 | 19 | app.MapControllers(); 20 | 21 | app.Run(); 22 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning.http: -------------------------------------------------------------------------------- 1 | @Question79295036AttributeRoutingWarning_HostAddress = http://localhost:5260 2 | 3 | GET {{Question79295036AttributeRoutingWarning_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace Question79295036AttributeRoutingWarning 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /StackOverflow/Question79295036AttributeRoutingWarning/Question79295036AttributeRoutingWarning/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /SwaggerValidatorSample/SwaggerValidatorSample/Controllers/CustomersController.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Web.OData; 3 | 4 | namespace SwaggerValidatorSample.Controllers 5 | { 6 | public class CustomersController : ODataController 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SwaggerValidatorSample/SwaggerValidatorSample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="SwaggerValidatorSample.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /SwaggerValidatorSample/SwaggerValidatorSample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Routing; 7 | 8 | namespace SwaggerValidatorSample 9 | { 10 | public class WebApiApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /TodoApi9/TodoApi9/TodoApi9.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /TodoApi9/TodoApi9/TodoDb.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace TodoApi9 4 | { 5 | public class TodoDb : DbContext 6 | { 7 | public TodoDb(DbContextOptions options) 8 | : base(options) { } 9 | 10 | 11 | public DbSet Todos => Set(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /TodoApi9/TodoApi9/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /TodoApi9/TodoApi9/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /UnboundFunctionConventionRouting/UnboundFunctionConventionRouting/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /UnboundFunctionConventionRouting/UnboundFunctionConventionRouting/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace UnboundNS 8 | { 9 | public class Address 10 | { 11 | public string City { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /UnboundFunctionConventionRouting/UnboundFunctionConventionRouting/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using UnboundFunctionConventionRouting.Models; 7 | 8 | namespace UnboundNS 9 | { 10 | public class Customer 11 | { 12 | public int Id { get; set; } 13 | 14 | public string Name { get; set; } 15 | 16 | public string LastName { get; set; } 17 | 18 | public CustomerType CustomerType { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UnboundFunctionConventionRouting/UnboundFunctionConventionRouting/Models/CustomerType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace UnboundNS 8 | { 9 | public enum CustomerType 10 | { 11 | Normal, 12 | Vip 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /UnqualifiedNameCall/UnqualifiedNameCall/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /UnqualifiedNameCall/UnqualifiedNameCall/Models/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Ga 8 | { 9 | public class Person 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /UntypeSample/UntypeSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /UntypeSample/UntypeSample/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WKBSample/WKBSample/Program.cs: -------------------------------------------------------------------------------- 1 | namespace WKBSample; 2 | 3 | internal static class Program 4 | { 5 | /// 6 | /// The main entry point for the application. 7 | /// 8 | [STAThread] 9 | static void Main() 10 | { 11 | // To customize application configuration such as set high DPI settings or default font, 12 | // see https://aka.ms/applicationconfiguration. 13 | ApplicationConfiguration.Initialize(); 14 | Application.Run(new Form1()); 15 | } 16 | } -------------------------------------------------------------------------------- /WKBSample/WKBSample/WBK/BitsInfo.cs: -------------------------------------------------------------------------------- 1 | namespace WKBSample.WBK; 2 | 3 | public class BitsInfo 4 | { 5 | public string Bytes { get; set; } 6 | 7 | public string Info { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /WKBSample/WKBSample/WBK/IWKBObject.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace WKBSample.WBK; 4 | 5 | internal interface IWKBObject 6 | { 7 | SpatialType SpatialType { get; } 8 | int? SRID { get; set; } 9 | 10 | void GetBits(IList bitInfos, WKBConfig config, bool handSrid); 11 | 12 | void GetWKB(StringBuilder wkb, WKBConfig config, bool handSrid, bool hasHeader); 13 | } 14 | -------------------------------------------------------------------------------- /WKBSample/WKBSample/WKBConfig.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace WKBSample; 3 | 4 | public enum ByteOrder : byte 5 | { 6 | // 7 | // BigEndian 8 | BigEndian, 9 | 10 | // 11 | // LittleEndian 12 | LittleEndian 13 | } 14 | 15 | 16 | public class WKBConfig 17 | { 18 | public bool IsoWKB { get; set; } 19 | 20 | public ByteOrder Order { get; set; } 21 | 22 | public int SRID { get; set; } 23 | 24 | public bool HasSRID { get; set; } 25 | 26 | public bool HasZ { get; set; } 27 | 28 | public bool HasM { get; set; } 29 | } -------------------------------------------------------------------------------- /WKBSample/WKBSample/WKBSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net8.0-windows 6 | disable 7 | true 8 | enable 9 | 10 | 11 | -------------------------------------------------------------------------------- /WebApiComplexTypeSkipPropertyTest/WebApiComplexTypeSkipPropertyTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WebApiComplexTypeSkipPropertyTest/WebApiComplexTypeSkipPropertyTest/SkipPropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebApiComplexTypeSkipPropertyTest 8 | { 9 | public class SkipPropertyAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WebApiODataSample/EdmModelLib/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EdmModelLib 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public IList Orders { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WebApiODataSample/EdmModelLib/Order.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EdmModelLib 8 | { 9 | public class Order 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Title { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /WebApiODataSample/EdmModelLib/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WebApiODataSample/EdmModelLib/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WebApiODataSample/WebApiODataSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WebApiWithEFSample/WebApiWithEFSample/Models.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebApiWithEFSample 8 | { 9 | public class Person 10 | { 11 | public int Id { get; set; } 12 | 13 | public string Name { get; set; } 14 | 15 | public Address Address { get; set; } 16 | } 17 | 18 | public class Address 19 | { 20 | public string City { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WebApiWithEFSample/WebApiWithEFSample/WebApiWithEfContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebApiWithEFSample 9 | { 10 | public class WebApiWithEfContext : DbContext 11 | { 12 | public IDbSet People { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/Address.cs: -------------------------------------------------------------------------------- 1 | // Configure the HTTP request pipeline. 2 | 3 | 4 | 5 | 6 | public class Address 7 | { 8 | public string Street { get; set; } 9 | public string City { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/Customer.cs: -------------------------------------------------------------------------------- 1 | // Configure the HTTP request pipeline. 2 | 3 | 4 | 5 | public class Customer 6 | { 7 | public int Id { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public IList Emails { get; set; } 12 | 13 | public Address Address { get; set; } 14 | 15 | public IList Orders { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/ModelBuilder.cs: -------------------------------------------------------------------------------- 1 | // Configure the HTTP request pipeline. 2 | 3 | 4 | 5 | using Microsoft.OData.Edm; 6 | using Microsoft.OData.ModelBuilder; 7 | 8 | public static class ModelBuilder 9 | { 10 | public static IEdmModel GetEdmModel() 11 | { 12 | var builder = new ODataConventionModelBuilder(); 13 | builder.EntitySet("Customers"); 14 | return builder.GetEdmModel(); 15 | } 16 | } -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/Order.cs: -------------------------------------------------------------------------------- 1 | // Configure the HTTP request pipeline. 2 | 3 | public class Order 4 | { 5 | public int Id { get; set; } 6 | 7 | public int Price { get; set; } 8 | 9 | public Address ShipTo { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.OData; 2 | 3 | var builder = WebApplication.CreateBuilder(args); 4 | 5 | // Add services to the container. 6 | 7 | builder.Services.AddControllers() 8 | .AddOData(opt => opt.EnableQueryFeatures().AddRouteComponents("odata", ModelBuilder.GetEdmModel())); 9 | 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | app.UseODataRouteDebug(); 15 | 16 | app.UseAuthorization(); 17 | 18 | app.MapControllers(); 19 | 20 | app.Run(); 21 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5171", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace issue1432DollarIt 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /issue1432DollarIt/issue1432DollarIt/issue1432DollarIt.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v6.x/.vs/WebApiOData6xSamples/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v6.x/.vs/WebApiOData6xSamples/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace AspNetClassicOData 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class CollectionModelDescription : ModelDescription 4 | { 5 | public ModelDescription ElementDescription { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ComplexTypeModelDescription : ModelDescription 6 | { 7 | public ComplexTypeModelDescription() 8 | { 9 | Properties = new Collection(); 10 | } 11 | 12 | public Collection Properties { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class EnumTypeModelDescription : ModelDescription 7 | { 8 | public EnumTypeModelDescription() 9 | { 10 | Values = new Collection(); 11 | } 12 | 13 | public Collection Values { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class EnumValueDescription 4 | { 5 | public string Documentation { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public string Value { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 5 | { 6 | public interface IModelDocumentationProvider 7 | { 8 | string GetDocumentation(MemberInfo member); 9 | 10 | string GetDocumentation(Type type); 11 | } 12 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class KeyValuePairModelDescription : ModelDescription 4 | { 5 | public ModelDescription KeyModelDescription { get; set; } 6 | 7 | public ModelDescription ValueModelDescription { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/ModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Describes a type model. 7 | /// 8 | public abstract class ModelDescription 9 | { 10 | public string Documentation { get; set; } 11 | 12 | public Type ModelType { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ParameterAnnotation 6 | { 7 | public Attribute AnnotationAttribute { get; set; } 8 | 9 | public string Documentation { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/SampleGeneration/SampleDirection.cs: -------------------------------------------------------------------------------- 1 | namespace AspNetClassicOData.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | @model CollectionModelDescription 3 | @if (Model.ElementDescription is ComplexTypeModelDescription) 4 | { 5 | @Html.DisplayFor(m => m.ElementDescription) 6 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | @model ComplexTypeModelDescription 3 | @Html.DisplayFor(m => m.Properties, "Parameters") -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | @model DictionaryModelDescription 3 | Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

8 |
9 | } 10 | else 11 | { 12 |

Sample not available.

13 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | @model KeyValuePairModelDescription 3 | Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml: -------------------------------------------------------------------------------- 1 | @using AspNetClassicOData.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Areas/HelpPage/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace AspNetClassicOData.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | ViewBag.Title = "Home Page"; 14 | 15 | return View(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="AspNetClassicOData.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Models/ShowHiddenAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace AspNetClassicOData.Models 7 | { 8 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] 9 | public class ShowHiddenAttribute : Attribute 10 | { 11 | } 12 | } -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v6.x/AspNetClassicOData/AspNetClassicOData/favicon.ico -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v6.x/AspNetClassicOData/AspNetClassicOData/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /v6.x/ModelLibrary/Address.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ModelLibrary 8 | { 9 | public class Address 10 | { 11 | public string Street { get; set; } 12 | 13 | public City CityInfo { get; set; } 14 | 15 | public IList Cities { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v6.x/ModelLibrary/City.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ModelLibrary 8 | { 9 | public class City 10 | { 11 | public int Id { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v6.x/ModelLibrary/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ModelLibrary 8 | { 9 | public class Customer 10 | { 11 | public int Id { get; set; } 12 | 13 | public Address Location { get; set; } 14 | 15 | public ICollection
Locations { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v6.x/ModelLibrary/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ModelLibrary 8 | { 9 | public class Person 10 | { 11 | public int Id { get; set; } 12 | 13 | public IList Items { get; set; } 14 | 15 | public IList StringItems { get; set; } 16 | 17 | public IDictionary DynamicProperties { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /v6.x/SimpleFunctionTest/SimpleFunctionTest/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /v6.x/SimpleFunctionTest/SimpleFunctionTest/Models/App.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace SimpleFunctionTest.Models 8 | { 9 | public class App 10 | { 11 | public int Id { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v7.x/CustomODataRouting/CustomODataRouting/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="CustomODataRouting.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /v7.x/CustomODataRouting/CustomODataRouting/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Routing; 7 | 8 | namespace CustomODataRouting 9 | { 10 | public class WebApiApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | GlobalConfiguration.Configure(WebApiConfig.Register); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v7.x/LocalDateTimeSample/LocalDateTimeSample/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace LocalDateTimeSample.Models 7 | { 8 | public class Customer 9 | { 10 | public int Id { get; set; } 11 | 12 | public string Name { get; set; } 13 | 14 | public DateTime ReleaseDate { get; set; } 15 | 16 | public DateTime? ModifiedDate { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /v7.x/LocalDateTimeSample/LocalDateTimeSample/Models/LocalDateTimeConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace LocalDateTimeSample.Models 8 | { 9 | public class LocalDateTimeConverter : IPrimitiveValueConverter 10 | { 11 | public object ConvertFromUnderlyingType(object value) 12 | { 13 | return value; 14 | } 15 | 16 | public object ConvertToUnderlyingType(object value) 17 | { 18 | return value; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /v7.x/LocalDateTimeSample/LocalDateTimeSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /v7.x/LocalDateTimeSample/LocalDateTimeSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/AddTypeAnnotationExtensions/AddTypeAnnotationExtensions/AddTypeAnnotationExtensions.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /v8.x/AddTypeAnnotationExtensions/AddTypeAnnotationExtensions/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace AddTypeAnnotationExtensions 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/AddTypeAnnotationExtensions/AddTypeAnnotationExtensions/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/AddTypeAnnotationExtensions/AddTypeAnnotationExtensions/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped.http: -------------------------------------------------------------------------------- 1 | @CollectionOfCollectionUsingEdmUntyped_HostAddress = http://localhost:5157 2 | 3 | GET {{CollectionOfCollectionUsingEdmUntyped_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/Models/ModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.ModelBuilder; 3 | 4 | namespace CollectionOfCollectionUsingEdmUntyped.Models 5 | { 6 | public static class ModelBuilder 7 | { 8 | public static IEdmModel GetEdmModel() 9 | { 10 | var builder = new ODataConventionModelBuilder(); 11 | builder.EntitySet("Planes"); 12 | return builder.GetEdmModel(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/Models/PlaneDto.cs: -------------------------------------------------------------------------------- 1 | namespace CollectionOfCollectionUsingEdmUntyped.Models 2 | { 3 | public class PlaneDto 4 | { 5 | public Guid Id { get; set; } 6 | public double[] Normal { get; set; } 7 | public double[] Point { get; set; } 8 | public double[] Points { get; set; } 9 | public object Contours { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/Program.cs: -------------------------------------------------------------------------------- 1 | using CollectionOfCollectionUsingEdmUntyped.Models; 2 | using Microsoft.AspNetCore.OData; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers() 9 | .AddOData(opt => opt.EnableQueryFeatures().AddRouteComponents("odata", ModelBuilder.GetEdmModel())); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | app.UseODataRouteDebug(); 15 | 16 | app.UseAuthorization(); 17 | 18 | 19 | app.MapControllers(); 20 | 21 | app.Run(); 22 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace CollectionOfCollectionUsingEdmUntyped 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/CollectionOfCollectionUsingEdmUntyped/CollectionOfCollectionUsingEdmUntyped/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/ComputeOrderByTest/ComputeOrderByTest/ComputeOrderByTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/ComputeOrderByTest/ComputeOrderByTest/ComputeOrderByTest.http: -------------------------------------------------------------------------------- 1 | @ComputeOrderByTest_HostAddress = http://localhost:5182 2 | 3 | GET {{ComputeOrderByTest_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | GET {{ComputeOrderByTest_HostAddress}}/odata/customers 8 | 9 | ### 10 | GET {{ComputeOrderByTest_HostAddress}}/odata/customers?$compute=age%20add%2010%20as%20agePlusTen&$select=id,name,agePlusTen 11 | 12 | ### 13 | GET {{ComputeOrderByTest_HostAddress}}/odata/customers?$compute=age%20add%2010%20as%20agePlusTen&$orderby=agePlusTen%20desc&$select=id,name,agePlusTen&$filter=agePlusTen%20ge%2021 14 | -------------------------------------------------------------------------------- /v8.x/ComputeOrderByTest/ComputeOrderByTest/Program.cs: -------------------------------------------------------------------------------- 1 | using ComputeOrderByTest; 2 | using Microsoft.AspNetCore.OData; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers() 9 | .AddOData(opt => opt.EnableQueryFeatures().AddRouteComponents("odata", EdmModelHelper.GetEdmModel())); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseAuthorization(); 16 | 17 | app.MapControllers(); 18 | 19 | app.Run(); 20 | -------------------------------------------------------------------------------- /v8.x/ComputeOrderByTest/ComputeOrderByTest/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "applicationUrl": "http://localhost:5182", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /v8.x/ComputeOrderByTest/ComputeOrderByTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/ComputeOrderByTest/ComputeOrderByTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/CreateNewTypeSample/CreateNewTypeSample/CreateNewTypeSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/CreateNewTypeSample/CreateNewTypeSample/Models/Person.cs: -------------------------------------------------------------------------------- 1 | namespace CreateNewTypeSample.Models 2 | { 3 | public class Person 4 | { 5 | public int Id { get; set; } 6 | 7 | public Temperature NormalTemp { get; set; } 8 | 9 | public Distance Dist { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v8.x/CreateNewTypeSample/CreateNewTypeSample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace CreateNewTypeSample 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/CreateNewTypeSample/CreateNewTypeSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/CreateNewTypeSample/CreateNewTypeSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/CustomizeSelectExpand/CustomizeSelectExpand/CustomizeSelectExpand.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /v8.x/CustomizeSelectExpand/CustomizeSelectExpand/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/CustomizeSelectExpand/CustomizeSelectExpand/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/DynamicRouteSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/DynamicRouteSample.http: -------------------------------------------------------------------------------- 1 | @DynamicRouteSample_HostAddress = http://localhost:5182 2 | 3 | GET {{DynamicRouteSample_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Extensions/IODataModelProvider.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | 3 | namespace DynamicRouteSample.Extensions; 4 | 5 | public interface IODataModelProvider 6 | { 7 | IEdmModel GetEdmModel(string prefix); 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Extensions/IODataRouteMatcher.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.UriParser; 2 | 3 | namespace DynamicRouteSample.Extensions; 4 | 5 | public interface IODataRouteMatcher 6 | { 7 | bool Match(string prefix, ODataPath path, RouteValueDictionary values); 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Extensions/ODataState.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample.Extensions; 2 | 3 | internal class ODataState 4 | { 5 | public ODataState(string prefix, IServiceProvider serviceProvider) 6 | { 7 | Prefix = prefix; 8 | ServiceProvider = serviceProvider; 9 | } 10 | 11 | public string Prefix { get; } 12 | 13 | public IServiceProvider ServiceProvider { get; } 14 | } 15 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Extensions/SegmentKind.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample.Extensions; 2 | 3 | public enum SegmentKind 4 | { 5 | EntitySet, 6 | Singleton, 7 | Key, 8 | Property, 9 | Navigation, 10 | Cast, 11 | Function, 12 | Action, 13 | Raw // Raw identifier without "{" and "}" 14 | } 15 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Models/Address.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample.Models; 2 | 3 | public class Address 4 | { 5 | public string City { get; set; } 6 | 7 | public string Street { get; set; } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample.Models; 2 | 3 | public class Customer 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public Address Address { get; set; } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Models/Order.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample.Models; 2 | 3 | public class Order 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Title { get; set; } 8 | 9 | public double Price { get; set; } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Models/Person.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample.Models; 2 | 3 | public class Person 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public IList Emails { get; set; } 10 | } -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/Program.cs: -------------------------------------------------------------------------------- 1 | using DynamicRouteSample.Extensions; 2 | using Microsoft.AspNetCore.OData; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(); 9 | builder.Services.AddDynamicOData(); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseODataRouteDebug(); 16 | 17 | app.UseAuthorization(); 18 | 19 | app.MapODataRoute("v1", q => q.EnableSelect = true); 20 | app.MapODataRoute("v2"); 21 | 22 | app.Run(); 23 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace DynamicRouteSample 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/DynamicRouteSample/DynamicRouteSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty.http: -------------------------------------------------------------------------------- 1 | @FilterOnTwoExpandDeepProperty_HostAddress = http://localhost:5017 2 | 3 | GET {{FilterOnTwoExpandDeepProperty_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/Models/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.ModelBuilder; 3 | 4 | namespace FilterOnTwoExpandDeepProperty.Models; 5 | 6 | public static class EdmModelBuilder 7 | { 8 | public static IEdmModel GetEdmModel() 9 | { 10 | var builder = new ODataConventionModelBuilder(); 11 | builder.EntitySet("Thing1Thing2RelationTable"); 12 | builder.EntityType(); 13 | return builder.GetEdmModel(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/Models/Models.cs: -------------------------------------------------------------------------------- 1 | namespace FilterOnTwoExpandDeepProperty.Models; 2 | 3 | public class Thing1Thing2RelationTable 4 | { 5 | public int Id { get; set; } 6 | 7 | public Thing1 Thing1 { get; set; } 8 | 9 | public int Thing2Id { get; set; } 10 | } 11 | 12 | public class Thing1 13 | { 14 | public int Id { get; set; } 15 | public string DisplayName { get; set; } 16 | public AttributeInfo Attribute { get; set; } 17 | } 18 | 19 | public class AttributeInfo 20 | { 21 | // public int Id { get;} 22 | public string Type { get; set; } 23 | } 24 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/Program.cs: -------------------------------------------------------------------------------- 1 | using FilterOnTwoExpandDeepProperty.Models; 2 | using Microsoft.AspNetCore.OData; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers() 9 | .AddOData(opt => opt.EnableQueryFeatures().AddRouteComponents("odata", EdmModelBuilder.GetEdmModel())); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseAuthorization(); 16 | 17 | app.MapControllers(); 18 | 19 | app.Run(); 20 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace FilterOnTwoExpandDeepProperty 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/FilterOnTwoExpandDeepProperty/FilterOnTwoExpandDeepProperty/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/FunctionTest/FunctionTest/FunctionTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/FunctionTest/FunctionTest/FunctionTest.http: -------------------------------------------------------------------------------- 1 | @FunctionTest_HostAddress = http://localhost:5219 2 | 3 | GET {{FunctionTest_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/FunctionTest/FunctionTest/Program.cs: -------------------------------------------------------------------------------- 1 | using FunctionTest.Models; 2 | using Microsoft.AspNetCore.OData; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers() 9 | .AddOData(opt => opt.EnableQueryFeatures().AddRouteComponents("odata", EdmModelBuilder.GetEdmModel())); 10 | 11 | var app = builder.Build(); 12 | 13 | // Configure the HTTP request pipeline. 14 | 15 | app.UseODataRouteDebug(); 16 | 17 | app.UseAuthorization(); 18 | 19 | app.MapControllers(); 20 | 21 | app.Run(); 22 | -------------------------------------------------------------------------------- /v8.x/FunctionTest/FunctionTest/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace FunctionTest 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/FunctionTest/FunctionTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/FunctionTest/FunctionTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/GenericControllerSample/GenericControllerSample/GenericControllerSample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/GenericControllerSample/GenericControllerSample/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | namespace GenericControllerSample.Models 2 | { 3 | public class Customer 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public Annotation Annotation { get; set; } 10 | 11 | public Attachement Attach { get; set; } 12 | } 13 | 14 | public class Annotation 15 | { 16 | public int Id { get; set; } 17 | public string Title { get; set; } 18 | } 19 | 20 | public class Attachement 21 | { 22 | public int Id { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /v8.x/GenericControllerSample/GenericControllerSample/Models/Order.cs: -------------------------------------------------------------------------------- 1 | namespace GenericControllerSample.Models 2 | { 3 | public class Order 4 | { 5 | public int Id { get; set; } 6 | 7 | public string Title { get; set; } 8 | 9 | public Attachement Attach { get; set; } 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /v8.x/GenericControllerSample/GenericControllerSample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace GenericControllerSample 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/GenericControllerSample/GenericControllerSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/GenericControllerSample/GenericControllerSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/NullValueSample/NullValueSample/NullValueSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /v8.x/NullValueSample/NullValueSample/NullValueSample.http: -------------------------------------------------------------------------------- 1 | @NullValueSample_HostAddress = http://localhost:5285 2 | 3 | GET {{NullValueSample_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/NullValueSample/NullValueSample/app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v8.x/NullValueSample/NullValueSample/app.db -------------------------------------------------------------------------------- /v8.x/NullValueSample/NullValueSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/NullValueSample/NullValueSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/OData.Annotations.Example/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.ModelBuilder; 3 | using OData.Annotations.Example.Controllers; 4 | 5 | internal class EdmModelBuilder 6 | { 7 | public static IEdmModel CreateEdmModel() 8 | { 9 | var builder = new ODataConventionModelBuilder(); 10 | 11 | var accountConfiguration = builder.EntitySet("Accounts").EntityType; 12 | accountConfiguration.Ignore(x => x.OwnerIdName); 13 | 14 | return builder.GetEdmModel(); 15 | } 16 | } -------------------------------------------------------------------------------- /v8.x/OData.Annotations.Example/OData.Annotations.Example.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/OData.Annotations.Example/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/OData.Annotations.Example/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery.http: -------------------------------------------------------------------------------- 1 | @ODataDynamicPropertiesQuery_HostAddress = http://localhost:5114 2 | 3 | GET {{ODataDynamicPropertiesQuery_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace ODataDynamicPropertiesQuery 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery/app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xuzhg/WebApiSample/e283b3a236a3fd550ff67f10b04e35c4996453f0/v8.x/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery/app.db -------------------------------------------------------------------------------- /v8.x/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/ODataDynamicPropertiesQuery/ODataDynamicPropertiesQuery/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/ODataDyncRouteSample/ODataDyncRouteSample/ODataDyncRouteSample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/ODataDyncRouteSample/ODataDyncRouteSample/ODataDyncRouteSample.http: -------------------------------------------------------------------------------- 1 | @ODataDyncRouteSample_HostAddress = http://localhost:5043 2 | 3 | GET {{ODataDyncRouteSample_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/ODataDyncRouteSample/ODataDyncRouteSample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace ODataDyncRouteSample 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/ODataDyncRouteSample/ODataDyncRouteSample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/ODataDyncRouteSample/ODataDyncRouteSample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/Models/Address.cs: -------------------------------------------------------------------------------- 1 | namespace OmitNullPropertySample.Models 2 | { 3 | public class Address 4 | { 5 | public string City { get; set; } 6 | 7 | public string Street { get; set; } 8 | 9 | public int ZipCode { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/Models/Color.cs: -------------------------------------------------------------------------------- 1 | namespace OmitNullPropertySample.Models 2 | { 3 | public enum Color 4 | { 5 | Red, 6 | 7 | Green, 8 | 9 | Blue, 10 | 11 | Black, 12 | 13 | Yellow 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/Models/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.Infrastructure; 2 | using Microsoft.OData.Edm; 3 | using Microsoft.OData.ModelBuilder; 4 | 5 | namespace OmitNullPropertySample.Models 6 | { 7 | public class EdmModelBuilder 8 | { 9 | public static IEdmModel GetEdmModel() 10 | { 11 | var builder = new ODataConventionModelBuilder(); 12 | builder.EntitySet("Schools"); 13 | builder.EntitySet("Students"); 14 | return builder.GetEdmModel(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/Models/ISchoolStudentRepository.cs: -------------------------------------------------------------------------------- 1 | namespace OmitNullPropertySample.Models 2 | { 3 | public interface ISchoolStudentRepository 4 | { 5 | IList Schools { get; } 6 | 7 | IList Students { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/Models/School.cs: -------------------------------------------------------------------------------- 1 | namespace OmitNullPropertySample.Models 2 | { 3 | public class School 4 | { 5 | public int ID { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public IList Emails { get; set; } 10 | 11 | public Address HeadQuarter { get; set; } 12 | 13 | public IList
Addresses { get; set; } 14 | 15 | public IList Students { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/Models/Student.cs: -------------------------------------------------------------------------------- 1 | namespace OmitNullPropertySample.Models 2 | { 3 | public class Student 4 | { 5 | public int ID { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public int Age { get; set; } 10 | 11 | public Color? FavoriteColor { get; set; } 12 | 13 | public Address HomeLocation { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/OmitNullPropertySample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace OmitNullPropertySample 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/OmitNullPropertySample/OmitNullPropertySample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/ActionSummary.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace PermissionsAnalytics.Models 3 | { 4 | public class ActionSummary 5 | { 6 | public int Assigned { get; set; } 7 | 8 | public int Exercised { get; set; } 9 | 10 | public int Available { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/AuthorizationSystemIdentity.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace PermissionsAnalytics.Models 3 | { 4 | public class AuthorizationSystemIdentity 5 | { 6 | 7 | public string Id 8 | { 9 | get; 10 | set; 11 | } 12 | 13 | public string ExternalId { get; set; } 14 | 15 | public string DisplayName { get; set; } 16 | 17 | public long IdentitySubType { get; set; } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/AuthorizationType.cs: -------------------------------------------------------------------------------- 1 |  2 | 3 | namespace PermissionsAnalytics.Models 4 | { 5 | public enum AuthorizationType 6 | { 7 | VCenter = 1, 8 | Aws = 2, 9 | Azure = 3, 10 | GCP = 4, 11 | Platform = 5, 12 | Kubernetes = 6, 13 | UnknownValue = 7 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/CloudknoxAuthorizationSystem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PermissionsAnalytics.Models 8 | { 9 | public class CloudknoxAuthorizationSystem 10 | { 11 | public string id { get; set; } 12 | public long dataSourceId { get; set; } 13 | public long timeStamp { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/CloudknoxIdentity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PermissionsAnalytics.Models 8 | { 9 | public class CloudknoxIdentity 10 | { 11 | public CloudknoxAuthorizationSystem authorizationSystem { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/Finding.cs: -------------------------------------------------------------------------------- 1 | namespace PermissionsAnalytics.Models 2 | { 3 | public class Finding 4 | { 5 | public int Id { get; set; } 6 | 7 | public DateTimeOffset? CreatedDateTime { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/IdentityGovernance.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.ModelBuilder; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Runtime.Serialization; 4 | 5 | namespace PermissionsAnalytics.Models 6 | { 7 | public class IdentityGovernance 8 | { 9 | //[IgnoreDataMember] 10 | //[Key] 11 | //public string Id { get; set; } 12 | 13 | [Contained] 14 | public PermissionsAnalyticsAggregation PermissionsAnalytics { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/PermissionsAnalytics.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.ModelBuilder; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Linq; 4 | using System.Runtime.Serialization; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace PermissionsAnalytics.Models 9 | { 10 | public class PermissionsAnalytics 11 | { 12 | [Contained] public List Findings { get; set; } 13 | 14 | //[IgnoreDataMember][Key] public string Id { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/PermissionsAnalyticsAggregation.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.ModelBuilder; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Runtime.Serialization; 4 | 5 | namespace PermissionsAnalytics.Models 6 | { 7 | public class PermissionsAnalyticsAggregation 8 | { 9 | [Contained] public PermissionsAnalytics Aws { get; set; } 10 | 11 | [Contained] public PermissionsAnalytics Azure { get; set; } 12 | 13 | [Contained] public PermissionsAnalytics Gcp { get; set; } 14 | 15 | //[IgnoreDataMember][Key] public int Id { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Models/PermissionsCreepIndex.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace PermissionsAnalytics.Models 3 | { 4 | public class PermissionsCreepIndex 5 | { 6 | public int Score { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/PermissionsAnalytics.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.OData; 2 | using PermissionsAnalytics.Models; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(). 9 | AddOData(opt => opt.EnableQueryFeatures().AddRouteComponents("odata", EdmModelBuilder.GetEdmModel())); 10 | 11 | builder.Services.AddSingleton(); 12 | 13 | var app = builder.Build(); 14 | 15 | // Configure the HTTP request pipeline. 16 | 17 | app.UseODataRouteDebug(); 18 | 19 | app.UseAuthorization(); 20 | 21 | app.MapControllers(); 22 | 23 | app.Run(); 24 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace PermissionsAnalytics 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/PermissionsAnalytics/PermissionsAnalytics/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/SpeakerWebApi/SpeakerWebApi/Models/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.ModelBuilder; 3 | 4 | namespace SpeakerWebApi.Models 5 | { 6 | public class EdmModelBuilder 7 | { 8 | public static IEdmModel GetEdmModel() 9 | { 10 | var builder = new ODataConventionModelBuilder(); 11 | builder.EntitySet("Classes"); 12 | builder.EntitySet("Students"); 13 | builder.EntitySet("Resources"); 14 | return builder.GetEdmModel(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v8.x/SpeakerWebApi/SpeakerWebApi/SpeakerWebApi.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | disable 6 | enable 7 | true 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /v8.x/SpeakerWebApi/SpeakerWebApi/SpeakerWebApi.http: -------------------------------------------------------------------------------- 1 | @SpeakerWebApi_HostAddress = http://localhost:5109 2 | 3 | GET {{SpeakerWebApi_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /v8.x/SpeakerWebApi/SpeakerWebApi/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace SpeakerWebApi 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateOnly Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /v8.x/SpeakerWebApi/SpeakerWebApi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/SpeakerWebApi/SpeakerWebApi/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/TimeZoneSamples/TimeZoneSamples/Models/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.ModelBuilder; 3 | 4 | namespace TimeZoneSamples.Models 5 | { 6 | public static class EdmModelBuilder 7 | { 8 | public static IEdmModel GetEdmModel() 9 | { 10 | var builder = new ODataConventionModelBuilder(); 11 | builder.EntitySet("Customers"); 12 | return builder.GetEdmModel(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /v8.x/TimeZoneSamples/TimeZoneSamples/TimeZoneSamples.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/TimeZoneSamples/TimeZoneSamples/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace TimeZoneSamples 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/TimeZoneSamples/TimeZoneSamples/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/TimeZoneSamples/TimeZoneSamples/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/Models/EdmModelBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.OData.Edm; 2 | using Microsoft.OData.ModelBuilder; 3 | 4 | namespace UpdateNestedNavigationPropertySample.Models 5 | { 6 | public class EdmModelBuilder 7 | { 8 | public static IEdmModel GetEdmModel() 9 | { 10 | var builder = new ODataConventionModelBuilder(); 11 | builder.EntitySet("Classes"); 12 | builder.EntitySet("GradingCategories"); 13 | 14 | return builder.GetEdmModel(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/Models/EducationClass.cs: -------------------------------------------------------------------------------- 1 | namespace UpdateNestedNavigationPropertySample.Models 2 | { 3 | public class EducationClass 4 | { 5 | public int Id { get; set; } 6 | 7 | public EducationSettings AssignmentSettings { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/Models/EducationGradingCategory.cs: -------------------------------------------------------------------------------- 1 | namespace UpdateNestedNavigationPropertySample.Models 2 | { 3 | public class EducationGradingCategory 4 | { 5 | public int Id { get; set; } 6 | 7 | public string DisplayName { get; set; } 8 | 9 | public int PercentageWeight { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/Models/EducationSettings.cs: -------------------------------------------------------------------------------- 1 | namespace UpdateNestedNavigationPropertySample.Models 2 | { 3 | public class EducationSettings 4 | { 5 | public bool SubmissionAnimationDisabled { get; set; } 6 | 7 | public IList GradingCategories { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | disable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace UpdateNestedNavigationPropertySample 2 | { 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string Summary { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v8.x/UpdateNestedNavigationPropertySample/UpdateNestedNavigationPropertySample/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/MinimalApiODataTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net9.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/MinimalApiODataTest.http: -------------------------------------------------------------------------------- 1 | @MinimalApiODataTest_HostAddress = http://localhost:5202 2 | 3 | GET {{MinimalApiODataTest_HostAddress}}/odata/customers 4 | 5 | ### 6 | 7 | GET {{MinimalApiODataTest_HostAddress}}/odata/customers?$expand=Orders($select=Amount)&$select=Name,HomeAddress($select=city) 8 | 9 | ### 10 | 11 | GET {{MinimalApiODataTest_HostAddress}}/odata/$metadata?$format=application/json 12 | 13 | ### -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/Models/Address.cs: -------------------------------------------------------------------------------- 1 | namespace MinimalApiODataTest.Models 2 | { 3 | public class Address 4 | { 5 | public string? City { get; set; } 6 | 7 | public string? Street { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/Models/Color.cs: -------------------------------------------------------------------------------- 1 | namespace MinimalApiODataTest.Models 2 | { 3 | public enum Color 4 | { 5 | Red, 6 | 7 | Green, 8 | 9 | Blue 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Drawing; 3 | using System.Net; 4 | 5 | namespace MinimalApiODataTest.Models 6 | { 7 | public class Customer 8 | { 9 | public int Id { get; set; } 10 | 11 | public string? Name { get; set; } 12 | 13 | public Color FavoriteColor { get; set; } 14 | 15 | public virtual Address? HomeAddress { get; set; } 16 | 17 | public virtual IList? Orders { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/Models/Order.cs: -------------------------------------------------------------------------------- 1 | namespace MinimalApiODataTest.Models 2 | { 3 | public class Order 4 | { 5 | public int Id { get; set; } 6 | 7 | public int Amount { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "http": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": true, 8 | "applicationUrl": "http://localhost:5202", 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/MinimalApiODataTest/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /v9.x/MinimalApiODataTest/readme.md: -------------------------------------------------------------------------------- 1 | # Minimal API OData test using latest package 2 | 3 | ## Run the MinimalApiODataTest application 4 | 5 | ## Run 'ClientForMinimal' for test, it is using ODataConnectService 6 | 7 | ## or using 'MinimalApiODataTest.http' file to generate request 8 | 9 | -------------------------------------------------------------------------------- /vNext/WebApiBugFix/WebApiBugFix/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | --------------------------------------------------------------------------------