diff --git a/RESTier.EF7.sln b/RESTier.EF7.sln index b6de6358..0150dcf0 100644 --- a/RESTier.EF7.sln +++ b/RESTier.EF7.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D5E947EB-03CB-4D04-8937-FF2131BB1F04}" EndProject diff --git a/src/Microsoft.Restier.Providers.EntityFramework7/Submit/ChangeSetInitializer.cs b/src/Microsoft.Restier.Providers.EntityFramework7/Submit/ChangeSetInitializer.cs index 8defe50b..83cfcd14 100644 --- a/src/Microsoft.Restier.Providers.EntityFramework7/Submit/ChangeSetInitializer.cs +++ b/src/Microsoft.Restier.Providers.EntityFramework7/Submit/ChangeSetInitializer.cs @@ -17,7 +17,7 @@ using Microsoft.Restier.Core.Submit; using Microsoft.Restier.Providers.EntityFramework.Properties; -namespace Microsoft.Restier.Providers.EntityFramework.Submit +namespace Microsoft.Restier.Providers.EntityFramework { /// /// To prepare changed entries for the given . @@ -43,13 +43,13 @@ public async Task InitializeAsync( foreach (var entry in context.ChangeSet.Entries.OfType()) { - object strongTypedDbSet = dbContext.GetType().GetProperty(entry.EntitySetName).GetValue(dbContext); + object strongTypedDbSet = dbContext.GetType().GetProperty(entry.ResourceSetName).GetValue(dbContext); Type entityType = strongTypedDbSet.GetType().GetGenericArguments()[0]; - // This means request entity is sub type of entity type - if (entry.ActualEntityType != null && entityType != entry.ActualEntityType) + // This means request resource is sub type of resource type + if (entry.ActualResourceType != null && entityType != entry.ActualResourceType) { - entityType = entry.ActualEntityType; + entityType = entry.ActualResourceType; } MethodInfo prepareEntryMethod = prepareEntryGeneric.MakeGenericMethod(entityType); @@ -104,7 +104,7 @@ private static async Task PrepareEntry( throw new NotSupportedException(Resources.DataModificationMustBeCUD); } - entry.Entity = entity; + entry.Resource = entity; } private static async Task FindEntity( @@ -112,7 +112,7 @@ private static async Task FindEntity( DataModificationItem entry, CancellationToken cancellationToken) { - IQueryable query = context.ApiContext.GetQueryableSource(entry.EntitySetName); + IQueryable query = context.ApiContext.GetQueryableSource(entry.ResourceSetName); query = entry.ApplyTo(query); QueryResult result = await context.ApiContext.QueryAsync(new QueryRequest(query), cancellationToken); @@ -150,7 +150,7 @@ private static object CreateFullUpdateInstance(DataModificationItem entry, Type // This will set any unspecified properties to their default value. object newInstance = Activator.CreateInstance(entityType); - ChangeSetInitializer.SetValues(newInstance, entityType, entry.EntityKey); + ChangeSetInitializer.SetValues(newInstance, entityType, entry.ResourceKey); ChangeSetInitializer.SetValues(newInstance, entityType, entry.LocalValues); return newInstance; diff --git a/test/Microsoft.Restier.Providers.EntityFramework7.Tests/DateTests.cs b/test/Microsoft.Restier.Providers.EntityFramework7.Tests/DateTests.cs index f2605af6..887e28ff 100644 --- a/test/Microsoft.Restier.Providers.EntityFramework7.Tests/DateTests.cs +++ b/test/Microsoft.Restier.Providers.EntityFramework7.Tests/DateTests.cs @@ -12,7 +12,6 @@ using Microsoft.Restier.Providers.EntityFramework7.Tests.Models.Primitives; using Microsoft.Restier.Publishers.OData; using Microsoft.Restier.Publishers.OData.Batch; -using Microsoft.Restier.Publishers.OData.Routing; using Microsoft.Restier.Tests; using Newtonsoft.Json; using Xunit; diff --git a/test/Microsoft.Restier.Providers.EntityFramework7.Tests/Microsoft.Restier.Providers.EntityFramework7.Tests.csproj b/test/Microsoft.Restier.Providers.EntityFramework7.Tests/Microsoft.Restier.Providers.EntityFramework7.Tests.csproj index 26e239f9..edcf532c 100644 --- a/test/Microsoft.Restier.Providers.EntityFramework7.Tests/Microsoft.Restier.Providers.EntityFramework7.Tests.csproj +++ b/test/Microsoft.Restier.Providers.EntityFramework7.Tests/Microsoft.Restier.Providers.EntityFramework7.Tests.csproj @@ -126,8 +126,8 @@ ..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll True - - ..\..\packages\Microsoft.AspNet.OData.5.9.0\lib\net45\System.Web.OData.dll + + ..\..\packages\Microsoft.AspNet.OData.5.9.1\lib\net45\System.Web.OData.dll True diff --git a/test/Microsoft.Restier.Providers.EntityFramework7.Tests/packages.config b/test/Microsoft.Restier.Providers.EntityFramework7.Tests/packages.config index 92acd7f4..a9e62546 100644 --- a/test/Microsoft.Restier.Providers.EntityFramework7.Tests/packages.config +++ b/test/Microsoft.Restier.Providers.EntityFramework7.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/Microsoft.OData.Service.Sample.Northwind.EF7.Tests.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/Microsoft.OData.Service.Sample.Northwind.EF7.Tests.csproj index 5a57355d..e62fc1e3 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/Microsoft.OData.Service.Sample.Northwind.EF7.Tests.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/Microsoft.OData.Service.Sample.Northwind.EF7.Tests.csproj @@ -133,8 +133,8 @@ ..\..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll True - - ..\..\..\packages\Microsoft.AspNet.OData.5.9.0\lib\net45\System.Web.OData.dll + + ..\..\..\packages\Microsoft.AspNet.OData.5.9.1\lib\net45\System.Web.OData.dll True diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/packages.config b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/packages.config index 7df42975..d9b3ab29 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/packages.config +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7.Tests/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/Microsoft.OData.Service.Sample.Northwind.EF7.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/Microsoft.OData.Service.Sample.Northwind.EF7.csproj index ee01cd73..c6026469 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/Microsoft.OData.Service.Sample.Northwind.EF7.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/Microsoft.OData.Service.Sample.Northwind.EF7.csproj @@ -145,8 +145,8 @@ ..\..\..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll True - - ..\..\..\packages\Microsoft.AspNet.OData.5.9.0\lib\net45\System.Web.OData.dll + + ..\..\..\packages\Microsoft.AspNet.OData.5.9.1\lib\net45\System.Web.OData.dll True diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/packages.config b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/packages.config index 45d6fc64..a200e7f4 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/packages.config +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Northwind.EF7/packages.config @@ -1,7 +1,7 @@  - + diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/Microsoft.OData.Service.Sample.Tests.csproj b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/Microsoft.OData.Service.Sample.Tests.csproj index 6bcb40e2..55fc0dee 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/Microsoft.OData.Service.Sample.Tests.csproj +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/Microsoft.OData.Service.Sample.Tests.csproj @@ -64,12 +64,12 @@ - - ..\..\..\packages\FluentAssertions.4.12.0\lib\net45\FluentAssertions.dll + + ..\..\..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.dll True - - ..\..\..\packages\FluentAssertions.4.12.0\lib\net45\FluentAssertions.Core.dll + + ..\..\..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.Core.dll True diff --git a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/packages.config b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/packages.config index dd3d3438..740423ac 100644 --- a/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/packages.config +++ b/test/ODataEndToEnd/Microsoft.OData.Service.Sample.Tests/packages.config @@ -1,6 +1,6 @@  - +