Skip to content

Commit

Permalink
update changes based on revoew comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ElizabethOkerio committed Oct 24, 2023
1 parent 65c55e0 commit 9188848
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 66 deletions.
2 changes: 1 addition & 1 deletion AspNetCoreOData.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ODataSampleCommon", "sample
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ODataAlternateKeySample", "sample\ODataAlternateKeySample\ODataAlternateKeySample.csproj", "{7B153669-A42F-4511-8BDB-587B3B27B2F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ODataPerformanceProfile", "ODataPerformanceProfile\ODataPerformanceProfile.csproj", "{8346AD1B-00E3-462D-B6B1-9AA3C2FB2850}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchmarkServer", "sample\BenchmarkServer\BenchmarkServer.csproj", "{8346AD1B-00E3-462D-B6B1-9AA3C2FB2850}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
33 changes: 0 additions & 33 deletions ODataPerformanceProfile/Controllers/WeatherForecastController.cs

This file was deleted.

13 changes: 0 additions & 13 deletions ODataPerformanceProfile/WeatherForecast.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\Microsoft.AspNetCore.OData\Microsoft.AspNetCore.OData.csproj" />
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.OData\Microsoft.AspNetCore.OData.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
using Microsoft.AspNetCore.Mvc;
//-----------------------------------------------------------------------------
// <copyright file="ProductsController.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.OData.Query;
using Microsoft.AspNetCore.OData.Routing.Controllers;
using ODataPerformanceProfile.Models;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
using Microsoft.OData.Edm;
//-----------------------------------------------------------------------------
// <copyright file="EdmModelBuilder.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

using Microsoft.OData.Edm;
using Microsoft.OData.ModelBuilder;
using ODataPerformanceProfile.Models;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
namespace ODataPerformanceProfile.Models
//-----------------------------------------------------------------------------
// <copyright file="Product.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

namespace ODataPerformanceProfile.Models
{
public class Product
{
public int Id { get; set; }

public string Category { get; set; }

public Color Color { get; set; }

public DateTimeOffset CreatedDate { get; set; }

public DateTimeOffset? UpdatedDate { get; set; }

public virtual ProductDetail Detail { get; set; }
public virtual ICollection<Supplier> ProductSuppliers { get; set; }
public virtual ICollection<Order> ProductOrders { get; set; }

public virtual ICollection<Order> ProductOrders { get; set; }
}

public class ProductDetail
{
public string Id { get; set; }

public string Info { get; set; }
}

Expand All @@ -36,9 +36,7 @@ public class Supplier
public enum Color
{
Red,

Green,

Blue
}

Expand All @@ -51,7 +49,6 @@ public class Location
public class Order
{
public int Id { get; set; }

public string OrderNo { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
using Microsoft.EntityFrameworkCore;
//-----------------------------------------------------------------------------
// <copyright file="ProductsContext.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

using Microsoft.EntityFrameworkCore;

namespace ODataPerformanceProfile.Models
{
Expand All @@ -12,7 +19,6 @@ public ProductsContext(DbContextOptions<ProductsContext> options)
public DbSet<Product> Products { get; set; }
public DbSet<Supplier> Suppliers { get; set; }
public DbSet<Order> Orders { get; set; }

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Product>().HasMany(a => a.ProductSuppliers);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//-----------------------------------------------------------------------------
// <copyright file="Program.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

using Microsoft.AspNetCore.OData;
using Microsoft.EntityFrameworkCore;
using ODataPerformanceProfile;
Expand All @@ -14,8 +21,6 @@

var app = builder.Build();



// Configure the HTTP request pipeline.
app.UseHttpsRedirection();

Expand Down
File renamed without changes.

0 comments on commit 9188848

Please sign in to comment.