This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASP.NET Core edition of the server with two repositories - an in-memory store and an EF Core edition.
- Loading branch information
1 parent
de816a8
commit 2b02e6e
Showing
83 changed files
with
10,256 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.6.30114.105 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{81138015-8205-4410-AFB3-4BA5E949B9C1}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureMobile.Server", "src\Microsoft.AzureMobile.Server\Microsoft.AzureMobile.Server.csproj", "{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureMobile.Server.InMemory", "src\Microsoft.AzureMobile.Server.InMemory\Microsoft.AzureMobile.Server.InMemory.csproj", "{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8E70DD2F-2182-439E-888F-4B6F73CCE95A}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureMobile.Common.Test", "test\Microsoft.AzureMobile.Common.Test\Microsoft.AzureMobile.Common.Test.csproj", "{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureMobile.WebService.Test", "test\Microsoft.AzureMobile.WebService.Test\Microsoft.AzureMobile.WebService.Test.csproj", "{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureMobile.Server.InMemory.Test", "test\Microsoft.AzureMobile.Server.InMemory.Test\Microsoft.AzureMobile.Server.InMemory.Test.csproj", "{F3C16337-ECE5-4F73-9A1E-528232D44C52}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AzureMobile.Server.Test", "test\Microsoft.AzureMobile.Server.Test\Microsoft.AzureMobile.Server.Test.csproj", "{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AzureMobile.Server.EFCore", "src\Microsoft.AzureMobile.Server.EFCore\Microsoft.AzureMobile.Server.EFCore.csproj", "{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AzureMobile.Server.EFCore.Test", "test\Microsoft.AzureMobile.Server.EFCore.Test\Microsoft.AzureMobile.Server.EFCore.Test.csproj", "{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Debug|x64.Build.0 = Debug|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Debug|x86.Build.0 = Debug|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Release|x64.ActiveCfg = Release|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Release|x64.Build.0 = Release|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Release|x86.ActiveCfg = Release|Any CPU | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059}.Release|x86.Build.0 = Release|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Debug|x64.Build.0 = Debug|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Debug|x86.Build.0 = Debug|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Release|x64.ActiveCfg = Release|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Release|x64.Build.0 = Release|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Release|x86.ActiveCfg = Release|Any CPU | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D}.Release|x86.Build.0 = Release|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Debug|x64.Build.0 = Debug|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Debug|x86.Build.0 = Debug|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Release|x64.ActiveCfg = Release|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Release|x64.Build.0 = Release|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Release|x86.ActiveCfg = Release|Any CPU | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F}.Release|x86.Build.0 = Release|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Debug|x64.Build.0 = Debug|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Debug|x86.Build.0 = Debug|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Release|x64.ActiveCfg = Release|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Release|x64.Build.0 = Release|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Release|x86.ActiveCfg = Release|Any CPU | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A}.Release|x86.Build.0 = Release|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Debug|x64.Build.0 = Debug|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Debug|x86.Build.0 = Debug|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Release|x64.ActiveCfg = Release|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Release|x64.Build.0 = Release|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Release|x86.ActiveCfg = Release|Any CPU | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52}.Release|x86.Build.0 = Release|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Debug|x64.Build.0 = Debug|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Debug|x86.Build.0 = Debug|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Release|x64.ActiveCfg = Release|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Release|x64.Build.0 = Release|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Release|x86.ActiveCfg = Release|Any CPU | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C}.Release|x86.Build.0 = Release|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Debug|x64.Build.0 = Debug|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Debug|x86.Build.0 = Debug|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Release|x64.ActiveCfg = Release|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Release|x64.Build.0 = Release|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Release|x86.ActiveCfg = Release|Any CPU | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6}.Release|x86.Build.0 = Release|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Debug|x64.Build.0 = Debug|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Debug|x86.Build.0 = Debug|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Release|x64.ActiveCfg = Release|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Release|x64.Build.0 = Release|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Release|x86.ActiveCfg = Release|Any CPU | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{2E5EAA65-ABFB-4693-9814-9EBCB25EB059} = {81138015-8205-4410-AFB3-4BA5E949B9C1} | ||
{23FF8835-11FE-4A0D-95AB-8DC7B36AE11D} = {81138015-8205-4410-AFB3-4BA5E949B9C1} | ||
{D3ED00B8-C924-46D0-BB9E-C246142D9E3F} = {8E70DD2F-2182-439E-888F-4B6F73CCE95A} | ||
{C602091B-DC94-4CFD-9E4C-7F27B4A3E08A} = {8E70DD2F-2182-439E-888F-4B6F73CCE95A} | ||
{F3C16337-ECE5-4F73-9A1E-528232D44C52} = {8E70DD2F-2182-439E-888F-4B6F73CCE95A} | ||
{9E547FED-7BA2-43BF-8A71-4C763FDCBC7C} = {8E70DD2F-2182-439E-888F-4B6F73CCE95A} | ||
{FFE32FF2-2025-4127-9BAA-AC08D9E5D1D6} = {81138015-8205-4410-AFB3-4BA5E949B9C1} | ||
{C7D7FF9A-FB7C-4746-9CCB-751FF81B876E} = {8E70DD2F-2182-439E-888F-4B6F73CCE95A} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {D1B5BA0C-B5E0-4E9B-BAD8-5E7C6841D6A2} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extensions: designer.cs generated.cs | ||
extensions: .cs .cpp .h | ||
// Copyright (c) Microsoft Corporation. All Rights Reserved. | ||
// Licensed under the MIT License. |
51 changes: 51 additions & 0 deletions
51
sdk/dotnet/src/Microsoft.AzureMobile.Server.EFCore/EntityTableData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) Microsoft Corporation. All Rights Reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
using System.Linq; | ||
|
||
namespace Microsoft.AzureMobile.Server.EFCore | ||
{ | ||
/// <summary> | ||
/// An "Entity Framework ready" version of the <see cref="ITableData"/> that | ||
/// can be used for augmenting the data transfer objects used | ||
/// with Microsoft.Zumo.Server. | ||
/// </summary> | ||
public abstract class EntityTableData : ITableData | ||
{ | ||
[Key] | ||
public string Id { get; set; } | ||
|
||
/// <summary> | ||
/// The date/time that the entity was updated. | ||
/// </summary> | ||
public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow; | ||
|
||
/// <summary> | ||
/// The row version for the entity. | ||
/// </summary> | ||
[Timestamp] | ||
public byte[] Version { get; set; } | ||
|
||
/// <summary> | ||
/// True if the entity is marked as deleted. | ||
/// </summary> | ||
public bool Deleted { get; set; } | ||
|
||
/// <summary> | ||
/// Implements the <see cref="IEquatable{T}"/> interface to determine | ||
/// if the system properties match the system properties of the other | ||
/// entity. | ||
/// </summary> | ||
/// <param name="other">The other entity</param> | ||
/// <returns>true if the entity matches and the system properties are set.</returns> | ||
public bool Equals(ITableData other) | ||
=> other != null | ||
&& Id == other.Id | ||
&& UpdatedAt == other.UpdatedAt | ||
&& Deleted == other.Deleted | ||
&& Version.SequenceEqual(other.Version); | ||
} | ||
} |
Oops, something went wrong.