@ -0,0 +1,505 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio 14 | |||
VisualStudioVersion = 14.0.25420.1 | |||
MinimumVisualStudioVersion = 10.0.40219.1 | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Droid", "eShopOnContainers\eShopOnContainers.Droid\eShopOnContainers.Droid.csproj", "{62DBB163-9CA9-4818-B48B-13233DF37C24}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.iOS", "eShopOnContainers\eShopOnContainers.iOS\eShopOnContainers.iOS.csproj", "{6EEB23DC-7063-4444-9AF8-90DF24F549C0}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{65116D1C-145B-4693-ABDA-F0FB6F425191}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Windows", "eShopOnContainers\eShopOnContainers.Windows\eShopOnContainers.Windows.csproj", "{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}" | |||
EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared Code", "Shared Code", "{65D002E7-E869-491C-ABA8-9650CEAF677A}" | |||
EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{8F848898-6B21-4905-AE2E-B3ABDEDA1963}" | |||
EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{71D6317D-AF0F-46FE-91DA-B0556911FC4B}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Droid", "eShopOnContainers\eShopOnContainers.TestRunner.Droid\eShopOnContainers.TestRunner.Droid.csproj", "{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.iOS", "eShopOnContainers\eShopOnContainers.TestRunner.iOS\eShopOnContainers.TestRunner.iOS.csproj", "{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Windows", "eShopOnContainers\eShopOnContainers.TestRunner.Windows\eShopOnContainers.TestRunner.Windows.csproj", "{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU | |||
Ad-Hoc|ARM = Ad-Hoc|ARM | |||
Ad-Hoc|iPhone = Ad-Hoc|iPhone | |||
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator | |||
Ad-Hoc|x64 = Ad-Hoc|x64 | |||
Ad-Hoc|x86 = Ad-Hoc|x86 | |||
AppStore|Any CPU = AppStore|Any CPU | |||
AppStore|ARM = AppStore|ARM | |||
AppStore|iPhone = AppStore|iPhone | |||
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator | |||
AppStore|x64 = AppStore|x64 | |||
AppStore|x86 = AppStore|x86 | |||
Debug|Any CPU = Debug|Any CPU | |||
Debug|ARM = Debug|ARM | |||
Debug|iPhone = Debug|iPhone | |||
Debug|iPhoneSimulator = Debug|iPhoneSimulator | |||
Debug|x64 = Debug|x64 | |||
Debug|x86 = Debug|x86 | |||
Release|Any CPU = Release|Any CPU | |||
Release|ARM = Release|ARM | |||
Release|iPhone = Release|iPhone | |||
Release|iPhoneSimulator = Release|iPhoneSimulator | |||
Release|x64 = Release|x64 | |||
Release|x86 = Release|x86 | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|ARM.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|x64.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|x86.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|Any CPU.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|Any CPU.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|Any CPU.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|ARM.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|ARM.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|ARM.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|iPhone.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|iPhone.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|iPhone.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|x64.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|x64.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|x64.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|x86.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|x86.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.AppStore|x86.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|ARM.Build.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|ARM.Deploy.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|iPhone.ActiveCfg = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|iPhone.Build.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|iPhone.Deploy.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|x64.ActiveCfg = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|x64.Build.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|x64.Deploy.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|x86.ActiveCfg = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|x86.Build.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Debug|x86.Deploy.0 = Debug|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|Any CPU.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|ARM.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|ARM.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|ARM.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|iPhone.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|iPhone.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|iPhone.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|x64.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|x64.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|x64.Deploy.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|x86.ActiveCfg = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|x86.Build.0 = Release|Any CPU | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24}.Release|x86.Deploy.0 = Release|Any CPU | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|ARM.ActiveCfg = AppStore|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|iPhone.ActiveCfg = AppStore|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|iPhone.Build.0 = AppStore|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|x64.ActiveCfg = AppStore|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.AppStore|x86.ActiveCfg = AppStore|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|Any CPU.ActiveCfg = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|Any CPU.Build.0 = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|ARM.ActiveCfg = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|iPhone.ActiveCfg = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|iPhone.Build.0 = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|x64.ActiveCfg = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Debug|x86.ActiveCfg = Debug|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|Any CPU.ActiveCfg = Release|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|ARM.ActiveCfg = Release|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|iPhone.ActiveCfg = Release|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|iPhone.Build.0 = Release|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|x64.ActiveCfg = Release|iPhone | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0}.Release|x86.ActiveCfg = Release|iPhone | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|ARM.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|x64.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Ad-Hoc|x86.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|Any CPU.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|Any CPU.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|ARM.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|ARM.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|iPhone.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|iPhone.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|x64.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|x64.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|x86.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.AppStore|x86.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|ARM.Build.0 = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|iPhone.ActiveCfg = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|iPhone.Build.0 = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|x64.ActiveCfg = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|x64.Build.0 = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|x86.ActiveCfg = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Debug|x86.Build.0 = Debug|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|ARM.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|ARM.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|iPhone.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|iPhone.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|x64.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|x64.Build.0 = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|x86.ActiveCfg = Release|Any CPU | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191}.Release|x86.Build.0 = Release|Any CPU | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|Any CPU.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|Any CPU.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|Any CPU.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|ARM.ActiveCfg = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|ARM.Build.0 = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|ARM.Deploy.0 = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|iPhone.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|iPhone.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|iPhone.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|x64.ActiveCfg = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|x64.Build.0 = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|x64.Deploy.0 = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|x86.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|x86.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Ad-Hoc|x86.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|Any CPU.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|Any CPU.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|Any CPU.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|ARM.ActiveCfg = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|ARM.Build.0 = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|ARM.Deploy.0 = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|iPhone.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|iPhone.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|iPhone.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|iPhoneSimulator.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|iPhoneSimulator.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|iPhoneSimulator.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|x64.ActiveCfg = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|x64.Build.0 = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|x64.Deploy.0 = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|x86.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|x86.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.AppStore|x86.Deploy.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|Any CPU.ActiveCfg = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|Any CPU.Build.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|Any CPU.Deploy.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|ARM.ActiveCfg = Debug|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|ARM.Build.0 = Debug|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|ARM.Deploy.0 = Debug|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|iPhone.ActiveCfg = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|iPhone.Build.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|iPhone.Deploy.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|iPhoneSimulator.Build.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|x64.ActiveCfg = Debug|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|x64.Build.0 = Debug|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|x64.Deploy.0 = Debug|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|x86.ActiveCfg = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|x86.Build.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Debug|x86.Deploy.0 = Debug|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|Any CPU.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|ARM.ActiveCfg = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|ARM.Build.0 = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|ARM.Deploy.0 = Release|ARM | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|iPhone.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|iPhoneSimulator.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x64.ActiveCfg = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x64.Build.0 = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x64.Deploy.0 = Release|x64 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.ActiveCfg = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.Build.0 = Release|x86 | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.Deploy.0 = Release|x86 | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|ARM.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x64.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x86.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|Any CPU.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|Any CPU.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|ARM.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|ARM.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhone.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhone.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x64.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x64.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x86.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x86.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|ARM.Build.0 = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhone.ActiveCfg = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhone.Build.0 = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x64.ActiveCfg = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x64.Build.0 = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x86.ActiveCfg = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x86.Build.0 = Debug|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|ARM.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|ARM.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhone.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhone.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x64.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x64.Build.0 = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x86.ActiveCfg = Release|Any CPU | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x86.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|ARM.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|x64.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|x86.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|Any CPU.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|Any CPU.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|Any CPU.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|ARM.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|ARM.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|ARM.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|iPhone.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|iPhone.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|iPhone.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|x64.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|x64.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|x64.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|x86.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|x86.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.AppStore|x86.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|Any CPU.Deploy.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|ARM.ActiveCfg = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|ARM.Build.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|ARM.Deploy.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|iPhone.ActiveCfg = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|iPhone.Build.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|iPhone.Deploy.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|x64.ActiveCfg = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|x64.Build.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|x64.Deploy.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|x86.ActiveCfg = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|x86.Build.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Debug|x86.Deploy.0 = Debug|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|Any CPU.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|ARM.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|ARM.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|ARM.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|iPhone.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|iPhone.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|iPhone.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x64.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x64.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x64.Deploy.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x86.ActiveCfg = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x86.Build.0 = Release|Any CPU | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x86.Deploy.0 = Release|Any CPU | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|ARM.ActiveCfg = AppStore|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|iPhone.ActiveCfg = AppStore|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|iPhone.Build.0 = AppStore|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|x64.ActiveCfg = AppStore|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.AppStore|x86.ActiveCfg = AppStore|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|Any CPU.ActiveCfg = Debug|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|ARM.ActiveCfg = Debug|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|iPhone.ActiveCfg = Debug|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|iPhone.Build.0 = Debug|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|x64.ActiveCfg = Debug|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Debug|x86.ActiveCfg = Debug|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|Any CPU.ActiveCfg = Release|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|ARM.ActiveCfg = Release|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|iPhone.ActiveCfg = Release|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|iPhone.Build.0 = Release|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|x64.ActiveCfg = Release|iPhone | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Release|x86.ActiveCfg = Release|iPhone | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|Any CPU.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|ARM.ActiveCfg = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|ARM.Build.0 = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|ARM.Deploy.0 = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhone.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhone.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhone.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x64.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x64.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x64.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x86.ActiveCfg = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x86.Build.0 = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x86.Deploy.0 = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|Any CPU.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|Any CPU.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|Any CPU.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|ARM.ActiveCfg = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|ARM.Build.0 = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|ARM.Deploy.0 = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhone.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhone.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhone.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhoneSimulator.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhoneSimulator.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhoneSimulator.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x64.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x64.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x64.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x86.ActiveCfg = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x86.Build.0 = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x86.Deploy.0 = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|Any CPU.ActiveCfg = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|ARM.ActiveCfg = Debug|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|ARM.Build.0 = Debug|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|ARM.Deploy.0 = Debug|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhone.ActiveCfg = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhone.Build.0 = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhone.Deploy.0 = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhoneSimulator.Build.0 = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x64.ActiveCfg = Debug|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x64.Build.0 = Debug|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x64.Deploy.0 = Debug|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x86.ActiveCfg = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x86.Build.0 = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x86.Deploy.0 = Debug|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|Any CPU.ActiveCfg = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|ARM.ActiveCfg = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|ARM.Build.0 = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|ARM.Deploy.0 = Release|ARM | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|iPhone.ActiveCfg = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|iPhoneSimulator.ActiveCfg = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x64.ActiveCfg = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x64.Build.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x64.Deploy.0 = Release|x64 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x86.ActiveCfg = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x86.Build.0 = Release|x86 | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x86.Deploy.0 = Release|x86 | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
GlobalSection(NestedProjects) = preSolution | |||
{62DBB163-9CA9-4818-B48B-13233DF37C24} = {8F848898-6B21-4905-AE2E-B3ABDEDA1963} | |||
{6EEB23DC-7063-4444-9AF8-90DF24F549C0} = {8F848898-6B21-4905-AE2E-B3ABDEDA1963} | |||
{65116D1C-145B-4693-ABDA-F0FB6F425191} = {65D002E7-E869-491C-ABA8-9650CEAF677A} | |||
{C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B} = {8F848898-6B21-4905-AE2E-B3ABDEDA1963} | |||
{F7B6A162-BC4D-4924-B16A-713F9B0344E7} = {71D6317D-AF0F-46FE-91DA-B0556911FC4B} | |||
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1} = {71D6317D-AF0F-46FE-91DA-B0556911FC4B} | |||
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3} = {71D6317D-AF0F-46FE-91DA-B0556911FC4B} | |||
{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F} = {71D6317D-AF0F-46FE-91DA-B0556911FC4B} | |||
EndGlobalSection | |||
EndGlobal |
@ -0,0 +1,26 @@ | |||
using System; | |||
using System.Globalization; | |||
using Xamarin.Forms; | |||
namespace eShopOnContainers.Core.Converters | |||
{ | |||
public class ItemsToHeightConverter : IValueConverter | |||
{ | |||
private const int ItemHeight = 144; | |||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
if(value is int) | |||
{ | |||
return System.Convert.ToInt32(value) * ItemHeight; | |||
} | |||
return 0; | |||
} | |||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | |||
{ | |||
return null; | |||
} | |||
} | |||
} |
@ -0,0 +1,105 @@ | |||
using eShopOnContainers.Core.Helpers; | |||
using eShopOnContainers.Core.ViewModels.Base; | |||
using eShopOnContainers.ViewModels.Base; | |||
using System; | |||
using System.Collections.ObjectModel; | |||
using Xamarin.Forms; | |||
namespace eShopOnContainers.Core.Models.Basket | |||
{ | |||
public class BasketItem : ExtendedBindableObject | |||
{ | |||
private string _id; | |||
private string _productId; | |||
private string _productName; | |||
private decimal _unitPrice; | |||
private int _quantity; | |||
private string _pictureUrl; | |||
private ObservableCollection<int> _numbers; | |||
public BasketItem() | |||
{ | |||
Numbers = NumericHelper.GetNumericList(); | |||
} | |||
public string Id | |||
{ | |||
get { return _id; } | |||
set | |||
{ | |||
_id = value; | |||
RaisePropertyChanged(() => Id); | |||
} | |||
} | |||
public string ProductId | |||
{ | |||
get { return _productId; } | |||
set | |||
{ | |||
_productId = value; | |||
RaisePropertyChanged(() => ProductId); | |||
} | |||
} | |||
public string ProductName | |||
{ | |||
get { return _productName; } | |||
set | |||
{ | |||
_productName = value; | |||
RaisePropertyChanged(() => ProductName); | |||
} | |||
} | |||
public decimal UnitPrice | |||
{ | |||
get { return _unitPrice; } | |||
set | |||
{ | |||
_unitPrice = value; | |||
RaisePropertyChanged(() => UnitPrice); | |||
} | |||
} | |||
public int Quantity | |||
{ | |||
get { return _quantity; } | |||
set | |||
{ | |||
_quantity = value; | |||
RaisePropertyChanged(() => Quantity); | |||
RaisePropertyChanged(() => Total); | |||
MessagingCenter.Send(this, MessengerKeys.UpdateProduct); | |||
} | |||
} | |||
public string PictureUrl | |||
{ | |||
get { return _pictureUrl; } | |||
set | |||
{ | |||
_pictureUrl = value; | |||
RaisePropertyChanged(() => PictureUrl); | |||
} | |||
} | |||
public decimal Total { get { return Quantity * UnitPrice; } } | |||
public ObservableCollection<int> Numbers | |||
{ | |||
get { return _numbers; } | |||
set | |||
{ | |||
_numbers = value; | |||
RaisePropertyChanged(() => Numbers); | |||
} | |||
} | |||
public override string ToString() | |||
{ | |||
return String.Format("Product Id: {0}, Quantity: {1}", ProductId, Quantity); | |||
} | |||
} | |||
} |
@ -0,0 +1,10 @@ | |||
using System.Collections.Generic; | |||
namespace eShopOnContainers.Core.Models.Basket | |||
{ | |||
public class CustomerBasket | |||
{ | |||
public string BuyerId { get; set; } | |||
public List<BasketItem> Items { get; set; } | |||
} | |||
} |
@ -0,0 +1,42 @@ | |||
using eShopOnContainers.Core.Models.Basket; | |||
using System.Collections.Generic; | |||
using System.Threading.Tasks; | |||
using Xamarin.Forms; | |||
using System; | |||
namespace eShopOnContainers.Core.Services.Basket | |||
{ | |||
public class BasketMockService : IBasketService | |||
{ | |||
private CustomerBasket MockCustomBasket = new CustomerBasket | |||
{ | |||
BuyerId = "9245fe4a-d402-451c-b9ed-9c1a04247482", | |||
Items = new List<BasketItem> | |||
{ | |||
new BasketItem { Id = "1", PictureUrl = Device.OS != TargetPlatform.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png", ProductId = "1", ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 19.50M }, | |||
new BasketItem { Id = "2", PictureUrl = Device.OS != TargetPlatform.Windows ? "fake_product_04.png" : "Assets/fake_product_04.png", ProductId = "4", ProductName = ".NET Black Cupt", Quantity = 1, UnitPrice = 17.00M } | |||
} | |||
}; | |||
public async Task<CustomerBasket> GetBasketAsync(string guidUser) | |||
{ | |||
await Task.Delay(500); | |||
if(string.IsNullOrEmpty(guidUser)) | |||
{ | |||
return new CustomerBasket(); | |||
} | |||
return MockCustomBasket; | |||
} | |||
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket) | |||
{ | |||
await Task.Delay(500); | |||
MockCustomBasket = customerBasket; | |||
return MockCustomBasket; | |||
} | |||
} | |||
} |
@ -0,0 +1,53 @@ | |||
using System; | |||
using System.Threading.Tasks; | |||
using eShopOnContainers.Core.Services.RequestProvider; | |||
using eShopOnContainers.Core.Models.Basket; | |||
namespace eShopOnContainers.Core.Services.Basket | |||
{ | |||
public class BasketService : IBasketService | |||
{ | |||
private readonly IRequestProvider _requestProvider; | |||
public BasketService(IRequestProvider requestProvider) | |||
{ | |||
_requestProvider = requestProvider; | |||
} | |||
public async Task<CustomerBasket> GetBasketAsync(string guidUser) | |||
{ | |||
try | |||
{ | |||
UriBuilder builder = new UriBuilder(GlobalSetting.BasketEndpoint); | |||
builder.Path = guidUser; | |||
string uri = builder.ToString(); | |||
CustomerBasket basket = | |||
await _requestProvider.GetAsync<CustomerBasket>(uri); | |||
return basket; | |||
} | |||
catch | |||
{ | |||
return new CustomerBasket | |||
{ | |||
BuyerId = guidUser, | |||
Items = new System.Collections.Generic.List<BasketItem>() | |||
}; | |||
} | |||
} | |||
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket) | |||
{ | |||
UriBuilder builder = new UriBuilder(GlobalSetting.BasketEndpoint); | |||
string uri = builder.ToString(); | |||
var result = await _requestProvider.PostAsync(uri, customerBasket); | |||
return result; | |||
} | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
using eShopOnContainers.Core.Models.Basket; | |||
using System.Threading.Tasks; | |||
namespace eShopOnContainers.Core.Services.Basket | |||
{ | |||
public interface IBasketService | |||
{ | |||
Task<CustomerBasket> GetBasketAsync(string guidUser); | |||
Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket); | |||
} | |||
} |
@ -1,13 +0,0 @@ | |||
using eShopOnContainers.Core.Models.Orders; | |||
using System.Collections.ObjectModel; | |||
using System.Threading.Tasks; | |||
namespace eShopOnContainers.Core.Services.Orders | |||
{ | |||
public interface IOrdersService | |||
{ | |||
Task<ObservableCollection<Order>> GetOrdersAsync(); | |||
Task<Order> GetCartAsync(); | |||
} | |||
} |
@ -1,39 +0,0 @@ | |||
using eShopOnContainers.Core.Models.Orders; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Collections.ObjectModel; | |||
using System.Threading.Tasks; | |||
namespace eShopOnContainers.Core.Services.Orders | |||
{ | |||
public class OrdersMockService : IOrdersService | |||
{ | |||
public async Task<ObservableCollection<Order>> GetOrdersAsync() | |||
{ | |||
await Task.Delay(500); | |||
return new ObservableCollection<Order> | |||
{ | |||
new Order { SequenceNumber = 123, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = GetOrderItems() }, | |||
new Order { SequenceNumber = 132, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = GetOrderItems() }, | |||
new Order { SequenceNumber = 231, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Delivered, OrderItems = GetOrderItems() }, | |||
}; | |||
} | |||
public async Task<Order> GetCartAsync() | |||
{ | |||
await Task.Delay(500); | |||
return new Order { SequenceNumber = 0123456789, Total = 56.40M, OrderDate = DateTime.Now, Status = OrderStatus.Pending, OrderItems = GetOrderItems() }; | |||
} | |||
private List<OrderItem> GetOrderItems() | |||
{ | |||
return new List<OrderItem> | |||
{ | |||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = 1, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M }, | |||
new OrderItem { OrderId = Guid.NewGuid(), ProductId = 3, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M } | |||
}; | |||
} | |||
} | |||
} |
@ -1,9 +1,12 @@ | |||
using System.Threading.Tasks; | |||
using eShopOnContainers.Core.Models.Orders; | |||
using System.Collections.Generic; | |||
using System.Threading.Tasks; | |||
namespace eShopOnContainers.Core.Services.User | |||
{ | |||
public interface IUserService | |||
{ | |||
Task<Models.User.User> GetUserAsync(); | |||
Task<List<Order>> GetOrdersAsync(); | |||
} | |||
} | |||
} |
@ -0,0 +1,150 @@ | |||
using eShopOnContainers.Core.Models.Basket; | |||
using eShopOnContainers.Core.Models.Catalog; | |||
using eShopOnContainers.Core.Models.Orders; | |||
using eShopOnContainers.Core.Models.User; | |||
using eShopOnContainers.Core.Services.Basket; | |||
using eShopOnContainers.Core.Services.User; | |||
using eShopOnContainers.Core.ViewModels.Base; | |||
using eShopOnContainers.ViewModels.Base; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Collections.ObjectModel; | |||
using System.Linq; | |||
using System.Threading.Tasks; | |||
using System.Windows.Input; | |||
using Xamarin.Forms; | |||
namespace eShopOnContainers.Core.ViewModels | |||
{ | |||
public class BasketViewModel : ViewModelBase | |||
{ | |||
private User _user; | |||
private int _badgeCount; | |||
private ObservableCollection<BasketItem> _basketItems; | |||
private decimal _total; | |||
private IUserService _userService; | |||
private IBasketService _basketService; | |||
public BasketViewModel(IUserService userService, | |||
IBasketService basketService) | |||
{ | |||
_userService = userService; | |||
_basketService = basketService; | |||
} | |||
public int BadgeCount | |||
{ | |||
get { return _badgeCount; } | |||
set | |||
{ | |||
_badgeCount = value; | |||
RaisePropertyChanged(() => BadgeCount); | |||
} | |||
} | |||
public ObservableCollection<BasketItem> BasketItems | |||
{ | |||
get { return _basketItems; } | |||
set | |||
{ | |||
_basketItems = value; | |||
RaisePropertyChanged(() => BasketItems); | |||
} | |||
} | |||
public decimal Total | |||
{ | |||
get { return _total; } | |||
set | |||
{ | |||
_total = value; | |||
RaisePropertyChanged(() => Total); | |||
} | |||
} | |||
public ICommand CheckoutCommand => new Command(Checkout); | |||
public override async Task InitializeAsync(object navigationData) | |||
{ | |||
MessagingCenter.Subscribe<CatalogViewModel, List<BasketItem>>(this, MessengerKeys.UpdateBasket, (sender, arg) => | |||
{ | |||
BadgeCount = arg.Count; | |||
foreach (var basketItem in arg) | |||
{ | |||
AddBasketItem(basketItem); | |||
} | |||
}); | |||
MessagingCenter.Subscribe<CatalogViewModel, CatalogItem>(this, MessengerKeys.AddProduct, (sender, arg) => | |||
{ | |||
BadgeCount++; | |||
AddCatalogItem(arg); | |||
}); | |||
MessagingCenter.Subscribe<OrderItem>(this, MessengerKeys.UpdateProduct, (sender) => | |||
{ | |||
ReCalculateTotal(); | |||
}); | |||
_user = await _userService.GetUserAsync(); | |||
BasketItems = new ObservableCollection<BasketItem>(); | |||
} | |||
private void AddCatalogItem(CatalogItem item) | |||
{ | |||
if (BasketItems.Any(o => o.ProductId.Equals(item.Id, StringComparison.CurrentCultureIgnoreCase))) | |||
{ | |||
var orderItem = BasketItems.First(o => o.ProductId.Equals(item.Id, StringComparison.CurrentCultureIgnoreCase)); | |||
orderItem.Quantity++; | |||
} | |||
else | |||
{ | |||
BasketItems.Add(new BasketItem | |||
{ | |||
ProductId = item.Id, | |||
ProductName = item.Name, | |||
PictureUrl = item.PictureUri, | |||
UnitPrice = item.Price, | |||
Quantity = 1 | |||
}); | |||
} | |||
ReCalculateTotal(); | |||
} | |||
private void AddBasketItem(BasketItem item) | |||
{ | |||
BasketItems.Add(item); | |||
ReCalculateTotal(); | |||
} | |||
private void ReCalculateTotal() | |||
{ | |||
Total = 0; | |||
foreach (var orderItem in BasketItems) | |||
{ | |||
Total += (orderItem.Quantity * orderItem.UnitPrice); | |||
} | |||
_basketService.UpdateBasketAsync(new CustomerBasket | |||
{ | |||
BuyerId = _user.GuidUser, | |||
Items = BasketItems.ToList() | |||
}); | |||
} | |||
private void Checkout() | |||
{ | |||
if (BasketItems.Any()) | |||
{ | |||
NavigationService.NavigateToAsync<CheckoutViewModel>(BasketItems); | |||
} | |||
} | |||
} | |||
} |
@ -1,117 +0,0 @@ | |||
using eShopOnContainers.Core.Helpers; | |||
using eShopOnContainers.Core.Models.Catalog; | |||
using eShopOnContainers.Core.Models.Orders; | |||
using eShopOnContainers.Core.Services.Orders; | |||
using eShopOnContainers.Core.ViewModels.Base; | |||
using eShopOnContainers.ViewModels.Base; | |||
using System; | |||
using System.Collections.ObjectModel; | |||
using System.Linq; | |||
using System.Threading.Tasks; | |||
using System.Windows.Input; | |||
using Xamarin.Forms; | |||
namespace eShopOnContainers.Core.ViewModels | |||
{ | |||
public class CartViewModel : ViewModelBase | |||
{ | |||
private int _badgeCount; | |||
private ObservableCollection<OrderItem> _orderItems; | |||
private decimal _total; | |||
private IOrdersService _orderService; | |||
public CartViewModel(IOrdersService orderService) | |||
{ | |||
_orderService = orderService; | |||
} | |||
public int BadgeCount | |||
{ | |||
get { return _badgeCount; } | |||
set | |||
{ | |||
_badgeCount = value; | |||
RaisePropertyChanged(() => BadgeCount); | |||
} | |||
} | |||
public ObservableCollection<OrderItem> OrderItems | |||
{ | |||
get { return _orderItems; } | |||
set | |||
{ | |||
_orderItems = value; | |||
RaisePropertyChanged(() => OrderItems); | |||
} | |||
} | |||
public decimal Total | |||
{ | |||
get { return _total; } | |||
set | |||
{ | |||
_total = value; | |||
RaisePropertyChanged(() => Total); | |||
} | |||
} | |||
public ICommand CheckoutCommand => new Command(Checkout); | |||
public override Task InitializeAsync(object navigationData) | |||
{ | |||
MessagingCenter.Subscribe<CatalogViewModel, CatalogItem>(this, MessengerKeys.AddProduct, (sender, arg) => | |||
{ | |||
BadgeCount++; | |||
AddCartItem(arg); | |||
}); | |||
MessagingCenter.Subscribe<OrderItem>(this, MessengerKeys.UpdateProduct, (sender) => | |||
{ | |||
ReCalculateTotal(); | |||
}); | |||
OrderItems = new ObservableCollection<OrderItem>(); | |||
return base.InitializeAsync(navigationData); | |||
} | |||
private void AddCartItem(CatalogItem item) | |||
{ | |||
if (OrderItems.Any(o => o.ProductId == Convert.ToInt32(item.Id))) | |||
{ | |||
var orderItem = OrderItems.First(o => o.ProductId == Convert.ToInt32(item.Id)); | |||
orderItem.Quantity++; | |||
} | |||
else | |||
{ | |||
OrderItems.Add(new OrderItem | |||
{ | |||
ProductId = Convert.ToInt32(item.Id), | |||
ProductName = item.Name, | |||
ProductImage = item.PictureUri, | |||
UnitPrice = item.Price, | |||
Quantity = 1 | |||
}); | |||
} | |||
ReCalculateTotal(); | |||
} | |||
private void ReCalculateTotal() | |||
{ | |||
Total = 0; | |||
foreach (var orderItem in OrderItems) | |||
{ | |||
Total += orderItem.Total; | |||
} | |||
} | |||
private void Checkout() | |||
{ | |||
NavigationService.NavigateToAsync<CheckoutViewModel>(OrderItems); | |||
} | |||
} | |||
} |
@ -0,0 +1,17 @@ | |||
using eShopOnContainers.Core.Services.Catalog; | |||
using System.Threading.Tasks; | |||
using Xunit; | |||
namespace eShopOnContainers.UnitTests | |||
{ | |||
public class BasketServiceTests | |||
{ | |||
[Fact] | |||
public async Task GetFakeBasketTest() | |||
{ | |||
var catalogMockService = new CatalogMockService(); | |||
var result = await catalogMockService.GetCatalogAsync(); | |||
Assert.NotEqual(0, result.Count); | |||
} | |||
} | |||
} |
@ -1,41 +0,0 @@ | |||
{ | |||
"version": "0.2.0", | |||
"configurations": [ | |||
{ | |||
"name": ".NET Core Launch (web)", | |||
"type": "coreclr", | |||
"request": "launch", | |||
"preLaunchTask": "build", | |||
"program": "${workspaceRoot}\\bin\\Debug\\netcoreapp1.0\\Ordering.API.dll", | |||
"args": [], | |||
"cwd": "${workspaceRoot}", | |||
"stopAtEntry": false, | |||
"launchBrowser": { | |||
"enabled": true, | |||
"args": "${auto-detect-url}", | |||
"windows": { | |||
"command": "cmd.exe", | |||
"args": "/C start ${auto-detect-url}" | |||
}, | |||
"osx": { | |||
"command": "open" | |||
}, | |||
"linux": { | |||
"command": "xdg-open" | |||
} | |||
}, | |||
"env": { | |||
"ASPNETCORE_ENVIRONMENT": "Development" | |||
}, | |||
"sourceFileMap": { | |||
"/Views": "${workspaceRoot}/Views" | |||
} | |||
}, | |||
{ | |||
"name": ".NET Core Attach", | |||
"type": "coreclr", | |||
"request": "attach", | |||
"processId": "${command.pickProcess}" | |||
} | |||
] | |||
} |
@ -1,16 +0,0 @@ | |||
{ | |||
"version": "0.1.0", | |||
"command": "dotnet", | |||
"isShellCommand": true, | |||
"args": [], | |||
"tasks": [ | |||
{ | |||
"taskName": "build", | |||
"args": [ | |||
"${workspaceRoot}\\project.json" | |||
], | |||
"isBuildCommand": true, | |||
"problemMatcher": "$msCompile" | |||
} | |||
] | |||
} |
@ -1,23 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Threading.Tasks; | |||
using Microsoft.AspNetCore.Mvc; | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers | |||
{ | |||
[Route("api/[controller]")] | |||
public class EnvironmentInfoController : Controller | |||
{ | |||
// GET api/environmentInfo/machinename | |||
[HttpGet("machinename")] | |||
public dynamic GetMachineName() | |||
{ | |||
return new | |||
{ | |||
InstanceName = Environment.MachineName | |||
}; | |||
} | |||
} | |||
} |
@ -1,129 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Threading.Tasks; | |||
using Microsoft.AspNetCore.Mvc; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.eShopOnContainers.Services.Ordering.Domain.Contracts; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.Queries; | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers | |||
{ | |||
[Route("api/[controller]")] | |||
public class OrderingController : Controller | |||
{ | |||
private IOrderRepository _orderRepository; | |||
private IOrderdingQueries _queries; | |||
//private OrderingDbContext _context; | |||
public OrderingController(IOrderRepository orderRepository, | |||
IOrderdingQueries orderingQueries //, | |||
//OrderingDbContext context | |||
) | |||
{ | |||
//Injected objects from the IoC container | |||
_orderRepository = orderRepository; | |||
_queries = orderingQueries; | |||
//_context = context; | |||
} | |||
// GET api/ordering/orders | |||
[HttpGet("orders")] | |||
public async Task<IActionResult> GetAllOrders() | |||
{ | |||
dynamic response = await _queries.GetAllOrdersIncludingValueObjectsAndChildEntities(); | |||
return Ok(response); | |||
} | |||
// GET api/ordering/orders/xxxGUIDxxxx | |||
[HttpGet("orders/{orderId:Guid}")] | |||
public async Task<IActionResult> GetOrderById(Guid orderId) | |||
{ | |||
dynamic response = await _queries.GetOrderById(orderId); | |||
return Ok(response); | |||
} | |||
//(CDLTLL) - Using parameters | |||
//Alternate method if using several parameters instead of part of the URL | |||
// GET api/ordering/orders/?orderId=xxxGUIDxxx&otherParam=value | |||
//[HttpGet("orders")] | |||
//public Order GetOrderByGuid([FromUri] Guid orderId, [FromUri] string otherParam) | |||
// POST api/ordering/orders/create | |||
[HttpPut("orders/create")] | |||
public async Task<IActionResult> Post([FromBody]Order order) | |||
{ | |||
_orderRepository.Add(order); | |||
int numChanges = await _orderRepository.UnitOfWork.CommitAsync(); | |||
return Ok(numChanges); | |||
} | |||
// PUT api/ordering/orders/xxxOrderGUIDxxxx/update | |||
[HttpPut("orders/{orderId:Guid}/update")] | |||
public async Task<IActionResult> UpdateOrder(Guid orderID, [FromBody] Order orderToUpdate) | |||
{ | |||
_orderRepository.Update(orderToUpdate); | |||
int numChanges = await _orderRepository.UnitOfWork.CommitAsync(); | |||
return Ok(numChanges); | |||
} | |||
// DELETE api/ordering/orders/xxxOrderGUIDxxxx | |||
[HttpDelete("orders/{orderId:Guid}/remove")] | |||
public async Task<IActionResult> Remove(Guid id) | |||
{ | |||
await _orderRepository.Remove(id); | |||
int numChanges = await _orderRepository.UnitOfWork.CommitAsync(); | |||
return Ok(numChanges); | |||
} | |||
// GET api/ordering/orders/add_test_data_and_get_all | |||
[HttpGet("orders/add_test_data_and_get_all")] | |||
public async Task<IActionResult> AddTestDataAndGetAllOrders() | |||
{ | |||
//TEST ADDING ORDERS ********************************* | |||
//Create generic Address ValueObject | |||
Address sampleAddress = new Address("15703 NE 61st Ct.", | |||
"Redmond", | |||
"Washington", | |||
"WA", | |||
"United States", | |||
"US", | |||
"98052", | |||
47.661492, | |||
-122.131309 | |||
); | |||
//Create sample Orders | |||
Order order1 = new Order(Guid.NewGuid(), sampleAddress, sampleAddress); | |||
//Add a few OrderItems | |||
order1.AddNewOrderItem(Guid.NewGuid(), 2, 25, 30); | |||
order1.AddNewOrderItem(Guid.NewGuid(), 1, 58, 0); | |||
order1.AddNewOrderItem(Guid.NewGuid(), 1, 60, 0); | |||
order1.AddNewOrderItem(Guid.NewGuid(), 3, 12, 0); | |||
order1.AddNewOrderItem(Guid.NewGuid(), 5, 3, 0); | |||
_orderRepository.Add(order1); | |||
int numRecs = await _orderRepository.UnitOfWork.CommitAsync(); | |||
//_context.Orders.Add(order1); | |||
//_context.SaveChanges(); | |||
//***************************************************** | |||
dynamic response = await _queries.GetAllOrdersIncludingValueObjectsAndChildEntities(); | |||
return Ok(response); | |||
} | |||
} | |||
} | |||
@ -0,0 +1,98 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers | |||
{ | |||
using Application.Commands; | |||
using Application.Queries; | |||
using MediatR; | |||
using Microsoft.AspNetCore.Mvc; | |||
using Models; | |||
using System; | |||
using System.Threading.Tasks; | |||
[Route("api/v1/[controller]")] | |||
public class OrdersController : Controller | |||
{ | |||
private readonly IMediator _mediator; | |||
private readonly IOrderQueries _orderQueries; | |||
public OrdersController(IMediator mediator, IOrderQueries orderQueries) | |||
{ | |||
if (mediator == null) | |||
{ | |||
throw new ArgumentNullException(nameof(mediator)); | |||
} | |||
if (orderQueries == null) | |||
{ | |||
throw new ArgumentNullException(nameof(orderQueries)); | |||
} | |||
_mediator = mediator; | |||
_orderQueries = orderQueries; | |||
} | |||
[Route("new")] | |||
[HttpPost] | |||
public async Task<IActionResult> AddOrder([FromBody]NewOrderViewModel order) | |||
{ | |||
var newOrderRequest = new NewOrderRequest() | |||
{ | |||
Buyer =GetUserName(), //TODO | |||
CardTypeId = 1, //TODO | |||
CardHolderName = order.CardHolderName, | |||
CardNumber = order.CardNumber, | |||
CardExpiration = order.CardExpiration, | |||
CardSecurityNumber = order.CardSecurityNumber, | |||
State = order.ShippingState, | |||
City = order.ShippingCity, | |||
Country = order.ShippingCountry, | |||
Street = order.ShippingStreet | |||
}; | |||
var added = await _mediator.SendAsync(newOrderRequest); | |||
if (added) | |||
{ | |||
return Ok(); | |||
} | |||
return BadRequest(); | |||
} | |||
[Route("{orderId:int}")] | |||
[HttpGet] | |||
public async Task<IActionResult> GetOrder(int orderId) | |||
{ | |||
var order = await _orderQueries.GetOrder(orderId); | |||
return Ok(order); | |||
} | |||
[Route("")] | |||
[HttpGet] | |||
public async Task<IActionResult> GetOrders() | |||
{ | |||
var orders = await _orderQueries.GetOrders(); | |||
return Ok(orders); | |||
} | |||
[Route("cardtypes")] | |||
[HttpGet] | |||
public async Task<IActionResult> GetCardTypes() | |||
{ | |||
var cardTypes = await _orderQueries.GetCardTypes(); | |||
return Ok(cardTypes); | |||
} | |||
string GetUserName() | |||
{ | |||
return "MOCK"; | |||
} | |||
} | |||
} | |||
@ -0,0 +1,14 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults | |||
{ | |||
using AspNetCore.Http; | |||
using Microsoft.AspNetCore.Mvc; | |||
public class InternalServerErrorObjectResult : ObjectResult | |||
{ | |||
public InternalServerErrorObjectResult(object error) | |||
: base(error) | |||
{ | |||
StatusCode = StatusCodes.Status500InternalServerError; | |||
} | |||
} | |||
} |
@ -0,0 +1,28 @@ | |||
| |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.AutofacModules | |||
{ | |||
using Application.Queries; | |||
using Autofac; | |||
using Domain.Repositories; | |||
using Ordering.Infrastructure.Repositories; | |||
public class ApplicationModule | |||
:Autofac.Module | |||
{ | |||
protected override void Load(ContainerBuilder builder) | |||
{ | |||
builder.RegisterType<OrderQueries>() | |||
.As<IOrderQueries>() | |||
.InstancePerLifetimeScope(); | |||
builder.RegisterType<BuyerRepository>() | |||
.As<IBuyerRepository>() | |||
.InstancePerLifetimeScope(); | |||
builder.RegisterType<OrderRepository>() | |||
.As<IOrderRepository>() | |||
.InstancePerLifetimeScope(); | |||
} | |||
} | |||
} |
@ -0,0 +1,43 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.AutofacModules | |||
{ | |||
using Application.Commands; | |||
using Application.Decorators; | |||
using Autofac; | |||
using Autofac.Core; | |||
using MediatR; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Reflection; | |||
public class MediatorModule : Autofac.Module | |||
{ | |||
protected override void Load(ContainerBuilder builder) | |||
{ | |||
builder.RegisterAssemblyTypes(typeof(IMediator).GetTypeInfo().Assembly) | |||
.AsImplementedInterfaces(); | |||
builder.RegisterAssemblyTypes(typeof(NewOrderRequest).GetTypeInfo().Assembly) | |||
.As(o => o.GetInterfaces() | |||
.Where(i => i.IsClosedTypeOf(typeof(IAsyncRequestHandler<,>))) | |||
.Select(i => new KeyedService("IAsyncRequestHandler", i))); | |||
builder.Register<SingleInstanceFactory>(context => | |||
{ | |||
var componentContext = context.Resolve<IComponentContext>(); | |||
return t => componentContext.Resolve(t); | |||
}); | |||
builder.Register<MultiInstanceFactory>(context => | |||
{ | |||
var componentContext = context.Resolve<IComponentContext>(); | |||
return t => (IEnumerable<object>)componentContext.Resolve(typeof(IEnumerable<>).MakeGenericType(t)); | |||
}); | |||
builder.RegisterGenericDecorator(typeof(LogDecorator<,>), | |||
typeof(IAsyncRequestHandler<,>), | |||
"IAsyncRequestHandler"); | |||
} | |||
} | |||
} |
@ -0,0 +1,45 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Filters | |||
{ | |||
using Microsoft.AspNetCore.Hosting; | |||
using Microsoft.AspNetCore.Mvc.Filters; | |||
using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.ActionResults; | |||
using Microsoft.Extensions.Logging; | |||
public class HttpGlobalExceptionFilter : IExceptionFilter | |||
{ | |||
private readonly IHostingEnvironment env; | |||
private readonly ILogger<HttpGlobalExceptionFilter> logger; | |||
public HttpGlobalExceptionFilter(IHostingEnvironment env, ILogger<HttpGlobalExceptionFilter> logger) | |||
{ | |||
this.env = env; | |||
this.logger = logger; | |||
} | |||
public void OnException(ExceptionContext context) | |||
{ | |||
logger.LogError(new EventId(context.Exception.HResult), | |||
context.Exception, | |||
context.Exception.Message); | |||
var json = new JsonErrorResponse | |||
{ | |||
Messages = new[] { "An error ocurr.Try it again." } | |||
}; | |||
if (env.IsDevelopment()) | |||
{ | |||
json.DeveloperMeesage = context.Exception; | |||
} | |||
context.Result = new InternalServerErrorObjectResult(json); | |||
} | |||
private class JsonErrorResponse | |||
{ | |||
public string[] Messages { get; set; } | |||
public object DeveloperMeesage { get; set; } | |||
} | |||
} | |||
} |
@ -0,0 +1,227 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure; | |||
namespace Ordering.API.Infrastructure.Migrations | |||
{ | |||
[DbContext(typeof(OrderingContext))] | |||
[Migration("20161124133626_InitialModel")] | |||
partial class InitialModel | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.1") | |||
.HasAnnotation("SqlServer:Sequence:ordering.buyerseq", "'buyerseq', 'ordering', '1', '10', '', '', 'Int64', 'False'") | |||
.HasAnnotation("SqlServer:Sequence:ordering.orderseq", "'orderseq', 'ordering', '1', '10', '', '', 'Int64', 'False'") | |||
.HasAnnotation("SqlServer:Sequence:ordering.paymentseq", "'paymentseq', 'ordering', '1', '10', '', '', 'Int64', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Address", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("State"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("address","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Buyer", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:HiLoSequenceName", "buyerseq") | |||
.HasAnnotation("SqlServer:HiLoSequenceSchema", "ordering") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); | |||
b.Property<string>("FullName") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.HasKey("Id"); | |||
b.HasIndex("FullName") | |||
.IsUnique(); | |||
b.ToTable("buyers","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.CardType", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValue(1); | |||
b.Property<string>("Name") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.HasKey("Id"); | |||
b.ToTable("cardtypes","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Order", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:HiLoSequenceName", "orderseq") | |||
.HasAnnotation("SqlServer:HiLoSequenceSchema", "ordering") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); | |||
b.Property<int>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("PaymentId"); | |||
b.Property<int?>("ShippingAddressId"); | |||
b.Property<int>("StatusId"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BuyerId"); | |||
b.HasIndex("PaymentId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.HasIndex("StatusId"); | |||
b.ToTable("orders","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderItem", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("OrderId"); | |||
b.Property<int>("ProductId"); | |||
b.Property<string>("ProductName") | |||
.IsRequired(); | |||
b.Property<decimal>("UnitPrice"); | |||
b.Property<int>("Units") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:DefaultValue", 1); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("orderItems","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderStatus", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValue(1); | |||
b.Property<string>("Name") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.HasKey("Id"); | |||
b.ToTable("orderstatus","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Payment", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:HiLoSequenceName", "paymentseq") | |||
.HasAnnotation("SqlServer:HiLoSequenceSchema", "ordering") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); | |||
b.Property<int>("BuyerId"); | |||
b.Property<string>("CardHolderName") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.Property<string>("CardNumber") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 25); | |||
b.Property<int>("CardTypeId"); | |||
b.Property<DateTime>("Expiration"); | |||
b.Property<string>("SecurityNumber"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BuyerId"); | |||
b.HasIndex("CardTypeId"); | |||
b.ToTable("payments","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Buyer", "Buyer") | |||
.WithMany() | |||
.HasForeignKey("BuyerId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Payment", "Payment") | |||
.WithMany() | |||
.HasForeignKey("PaymentId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderStatus", "Status") | |||
.WithMany() | |||
.HasForeignKey("StatusId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Payment", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Buyer") | |||
.WithMany("Payments") | |||
.HasForeignKey("BuyerId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.CardType", "CardType") | |||
.WithMany() | |||
.HasForeignKey("CardTypeId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -0,0 +1,283 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
namespace Ordering.API.Infrastructure.Migrations | |||
{ | |||
public partial class InitialModel : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.EnsureSchema( | |||
name: "ordering"); | |||
migrationBuilder.CreateSequence( | |||
name: "buyerseq", | |||
schema: "ordering", | |||
incrementBy: 10); | |||
migrationBuilder.CreateSequence( | |||
name: "orderseq", | |||
schema: "ordering", | |||
incrementBy: 10); | |||
migrationBuilder.CreateSequence( | |||
name: "paymentseq", | |||
schema: "ordering", | |||
incrementBy: 10); | |||
migrationBuilder.CreateTable( | |||
name: "address", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false) | |||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), | |||
City = table.Column<string>(nullable: true), | |||
Country = table.Column<string>(nullable: true), | |||
State = table.Column<string>(nullable: true), | |||
Street = table.Column<string>(nullable: true), | |||
ZipCode = table.Column<string>(nullable: true) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_address", x => x.Id); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "buyers", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false), | |||
FullName = table.Column<string>(maxLength: 200, nullable: false) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_buyers", x => x.Id); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "cardtypes", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false, defaultValue: 1), | |||
Name = table.Column<string>(maxLength: 200, nullable: false) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_cardtypes", x => x.Id); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "orderstatus", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false, defaultValue: 1), | |||
Name = table.Column<string>(maxLength: 200, nullable: false) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_orderstatus", x => x.Id); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "payments", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false), | |||
BuyerId = table.Column<int>(nullable: false), | |||
CardHolderName = table.Column<string>(maxLength: 200, nullable: false), | |||
CardNumber = table.Column<string>(maxLength: 25, nullable: false), | |||
CardTypeId = table.Column<int>(nullable: false), | |||
Expiration = table.Column<DateTime>(nullable: false), | |||
SecurityNumber = table.Column<string>(nullable: true) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_payments", x => x.Id); | |||
table.ForeignKey( | |||
name: "FK_payments_buyers_BuyerId", | |||
column: x => x.BuyerId, | |||
principalSchema: "ordering", | |||
principalTable: "buyers", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Cascade); | |||
table.ForeignKey( | |||
name: "FK_payments_cardtypes_CardTypeId", | |||
column: x => x.CardTypeId, | |||
principalSchema: "ordering", | |||
principalTable: "cardtypes", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Cascade); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "orders", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false), | |||
BuyerId = table.Column<int>(nullable: false), | |||
OrderDate = table.Column<DateTime>(nullable: false), | |||
PaymentId = table.Column<int>(nullable: false), | |||
ShippingAddressId = table.Column<int>(nullable: true), | |||
StatusId = table.Column<int>(nullable: false) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_orders", x => x.Id); | |||
table.ForeignKey( | |||
name: "FK_orders_buyers_BuyerId", | |||
column: x => x.BuyerId, | |||
principalSchema: "ordering", | |||
principalTable: "buyers", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Cascade); | |||
table.ForeignKey( | |||
name: "FK_orders_payments_PaymentId", | |||
column: x => x.PaymentId, | |||
principalSchema: "ordering", | |||
principalTable: "payments", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Restrict); | |||
table.ForeignKey( | |||
name: "FK_orders_address_ShippingAddressId", | |||
column: x => x.ShippingAddressId, | |||
principalSchema: "ordering", | |||
principalTable: "address", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Restrict); | |||
table.ForeignKey( | |||
name: "FK_orders_orderstatus_StatusId", | |||
column: x => x.StatusId, | |||
principalSchema: "ordering", | |||
principalTable: "orderstatus", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Cascade); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "orderItems", | |||
schema: "ordering", | |||
columns: table => new | |||
{ | |||
Id = table.Column<int>(nullable: false) | |||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), | |||
Discount = table.Column<decimal>(nullable: false), | |||
OrderId = table.Column<int>(nullable: false), | |||
ProductId = table.Column<int>(nullable: false), | |||
ProductName = table.Column<string>(nullable: false), | |||
UnitPrice = table.Column<decimal>(nullable: false), | |||
Units = table.Column<int>(nullable: false, defaultValue: 1) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_orderItems", x => x.Id); | |||
table.ForeignKey( | |||
name: "FK_orderItems_orders_OrderId", | |||
column: x => x.OrderId, | |||
principalSchema: "ordering", | |||
principalTable: "orders", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Cascade); | |||
}); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_buyers_FullName", | |||
schema: "ordering", | |||
table: "buyers", | |||
column: "FullName", | |||
unique: true); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_orders_BuyerId", | |||
schema: "ordering", | |||
table: "orders", | |||
column: "BuyerId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_orders_PaymentId", | |||
schema: "ordering", | |||
table: "orders", | |||
column: "PaymentId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_orders_ShippingAddressId", | |||
schema: "ordering", | |||
table: "orders", | |||
column: "ShippingAddressId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_orders_StatusId", | |||
schema: "ordering", | |||
table: "orders", | |||
column: "StatusId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_orderItems_OrderId", | |||
schema: "ordering", | |||
table: "orderItems", | |||
column: "OrderId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_payments_BuyerId", | |||
schema: "ordering", | |||
table: "payments", | |||
column: "BuyerId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_payments_CardTypeId", | |||
schema: "ordering", | |||
table: "payments", | |||
column: "CardTypeId"); | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.DropSequence( | |||
name: "buyerseq", | |||
schema: "ordering"); | |||
migrationBuilder.DropSequence( | |||
name: "orderseq", | |||
schema: "ordering"); | |||
migrationBuilder.DropSequence( | |||
name: "paymentseq", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "orderItems", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "orders", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "payments", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "address", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "orderstatus", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "buyers", | |||
schema: "ordering"); | |||
migrationBuilder.DropTable( | |||
name: "cardtypes", | |||
schema: "ordering"); | |||
} | |||
} | |||
} |
@ -0,0 +1,226 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure; | |||
namespace Ordering.API.Infrastructure.Migrations | |||
{ | |||
[DbContext(typeof(OrderingContext))] | |||
partial class OrderingContextModelSnapshot : ModelSnapshot | |||
{ | |||
protected override void BuildModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.1") | |||
.HasAnnotation("SqlServer:Sequence:ordering.buyerseq", "'buyerseq', 'ordering', '1', '10', '', '', 'Int64', 'False'") | |||
.HasAnnotation("SqlServer:Sequence:ordering.orderseq", "'orderseq', 'ordering', '1', '10', '', '', 'Int64', 'False'") | |||
.HasAnnotation("SqlServer:Sequence:ordering.paymentseq", "'paymentseq', 'ordering', '1', '10', '', '', 'Int64', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Address", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("State"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("address","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Buyer", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:HiLoSequenceName", "buyerseq") | |||
.HasAnnotation("SqlServer:HiLoSequenceSchema", "ordering") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); | |||
b.Property<string>("FullName") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.HasKey("Id"); | |||
b.HasIndex("FullName") | |||
.IsUnique(); | |||
b.ToTable("buyers","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.CardType", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValue(1); | |||
b.Property<string>("Name") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.HasKey("Id"); | |||
b.ToTable("cardtypes","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Order", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:HiLoSequenceName", "orderseq") | |||
.HasAnnotation("SqlServer:HiLoSequenceSchema", "ordering") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); | |||
b.Property<int>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("PaymentId"); | |||
b.Property<int?>("ShippingAddressId"); | |||
b.Property<int>("StatusId"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BuyerId"); | |||
b.HasIndex("PaymentId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.HasIndex("StatusId"); | |||
b.ToTable("orders","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderItem", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("OrderId"); | |||
b.Property<int>("ProductId"); | |||
b.Property<string>("ProductName") | |||
.IsRequired(); | |||
b.Property<decimal>("UnitPrice"); | |||
b.Property<int>("Units") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:DefaultValue", 1); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("orderItems","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderStatus", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValue(1); | |||
b.Property<string>("Name") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.HasKey("Id"); | |||
b.ToTable("orderstatus","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Payment", b => | |||
{ | |||
b.Property<int>("Id") | |||
.ValueGeneratedOnAdd() | |||
.HasAnnotation("SqlServer:HiLoSequenceName", "paymentseq") | |||
.HasAnnotation("SqlServer:HiLoSequenceSchema", "ordering") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo); | |||
b.Property<int>("BuyerId"); | |||
b.Property<string>("CardHolderName") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 200); | |||
b.Property<string>("CardNumber") | |||
.IsRequired() | |||
.HasAnnotation("MaxLength", 25); | |||
b.Property<int>("CardTypeId"); | |||
b.Property<DateTime>("Expiration"); | |||
b.Property<string>("SecurityNumber"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BuyerId"); | |||
b.HasIndex("CardTypeId"); | |||
b.ToTable("payments","ordering"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Buyer", "Buyer") | |||
.WithMany() | |||
.HasForeignKey("BuyerId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Payment", "Payment") | |||
.WithMany() | |||
.HasForeignKey("PaymentId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderStatus", "Status") | |||
.WithMany() | |||
.HasForeignKey("StatusId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.Payment", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.Buyer") | |||
.WithMany("Payments") | |||
.HasForeignKey("BuyerId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.CardType", "CardType") | |||
.WithMany() | |||
.HasForeignKey("CardTypeId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -0,0 +1,42 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure | |||
{ | |||
using AspNetCore.Builder; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.eShopOnContainers.Services.Ordering.Domain; | |||
using Ordering.Infrastructure; | |||
using System.Linq; | |||
using System.Threading.Tasks; | |||
public class OrderingContextSeed | |||
{ | |||
public static async Task SeedAsync(IApplicationBuilder applicationBuilder) | |||
{ | |||
var context = (OrderingContext)applicationBuilder | |||
.ApplicationServices.GetService(typeof(OrderingContext)); | |||
using (context) | |||
{ | |||
context.Database.Migrate(); | |||
if (!context.CardTypes.Any()) | |||
{ | |||
context.CardTypes.Add(CardType.Amex); | |||
context.CardTypes.Add(CardType.Visa); | |||
context.CardTypes.Add(CardType.MasterCard); | |||
await context.SaveChangesAsync(); | |||
} | |||
if (!context.OrderStatus.Any()) | |||
{ | |||
context.OrderStatus.Add(OrderStatus.Canceled); | |||
context.OrderStatus.Add(OrderStatus.InProcess); | |||
context.OrderStatus.Add(OrderStatus.Shipped); | |||
} | |||
await context.SaveChangesAsync(); | |||
} | |||
} | |||
} | |||
} |
@ -1,121 +0,0 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
namespace Ordering.API.Migrations | |||
{ | |||
[DbContext(typeof(OrderingDbContext))] | |||
[Migration("20160913204939_Migration1")] | |||
partial class Migration1 | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431") | |||
.HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("CountryCode"); | |||
b.Property<double>("Latitude"); | |||
b.Property<double>("Longitude"); | |||
b.Property<string>("State"); | |||
b.Property<string>("StateCode"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("Address"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<Guid?>("BillingAddressId"); | |||
b.Property<Guid>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("SequenceNumber") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); | |||
b.Property<Guid?>("ShippingAddressId"); | |||
b.Property<int>("Status"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BillingAddressId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.ToTable("Orders"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("FulfillmentRemaining"); | |||
b.Property<Guid>("OrderId"); | |||
b.Property<Guid>("ProductId"); | |||
b.Property<int>("Quantity"); | |||
b.Property<decimal>("UnitPrice"); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("OrderItem"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") | |||
.WithMany() | |||
.HasForeignKey("BillingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -1,123 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
namespace Ordering.API.Migrations | |||
{ | |||
public partial class Migration1 : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.EnsureSchema( | |||
name: "shared"); | |||
migrationBuilder.CreateSequence<int>( | |||
name: "OrderSequences", | |||
schema: "shared", | |||
startValue: 1001L); | |||
migrationBuilder.CreateTable( | |||
name: "Address", | |||
columns: table => new | |||
{ | |||
Id = table.Column<Guid>(nullable: false), | |||
City = table.Column<string>(nullable: true), | |||
Country = table.Column<string>(nullable: true), | |||
CountryCode = table.Column<string>(nullable: true), | |||
Latitude = table.Column<double>(nullable: false), | |||
Longitude = table.Column<double>(nullable: false), | |||
State = table.Column<string>(nullable: true), | |||
StateCode = table.Column<string>(nullable: true), | |||
Street = table.Column<string>(nullable: true), | |||
ZipCode = table.Column<string>(nullable: true) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_Address", x => x.Id); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "Orders", | |||
columns: table => new | |||
{ | |||
Id = table.Column<Guid>(nullable: false), | |||
BillingAddressId = table.Column<Guid>(nullable: true), | |||
BuyerId = table.Column<Guid>(nullable: false), | |||
OrderDate = table.Column<DateTime>(nullable: false), | |||
SequenceNumber = table.Column<int>(nullable: false, defaultValueSql: "NEXT VALUE FOR shared.OrderSequences"), | |||
ShippingAddressId = table.Column<Guid>(nullable: true), | |||
Status = table.Column<int>(nullable: false) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_Orders", x => x.Id); | |||
table.ForeignKey( | |||
name: "FK_Orders_Address_BillingAddressId", | |||
column: x => x.BillingAddressId, | |||
principalTable: "Address", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Restrict); | |||
table.ForeignKey( | |||
name: "FK_Orders_Address_ShippingAddressId", | |||
column: x => x.ShippingAddressId, | |||
principalTable: "Address", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Restrict); | |||
}); | |||
migrationBuilder.CreateTable( | |||
name: "OrderItem", | |||
columns: table => new | |||
{ | |||
Id = table.Column<Guid>(nullable: false), | |||
Discount = table.Column<decimal>(nullable: false), | |||
FulfillmentRemaining = table.Column<int>(nullable: false), | |||
OrderId = table.Column<Guid>(nullable: false), | |||
ProductId = table.Column<Guid>(nullable: false), | |||
Quantity = table.Column<int>(nullable: false), | |||
UnitPrice = table.Column<decimal>(nullable: false) | |||
}, | |||
constraints: table => | |||
{ | |||
table.PrimaryKey("PK_OrderItem", x => x.Id); | |||
table.ForeignKey( | |||
name: "FK_OrderItem_Orders_OrderId", | |||
column: x => x.OrderId, | |||
principalTable: "Orders", | |||
principalColumn: "Id", | |||
onDelete: ReferentialAction.Cascade); | |||
}); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_Orders_BillingAddressId", | |||
table: "Orders", | |||
column: "BillingAddressId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_Orders_ShippingAddressId", | |||
table: "Orders", | |||
column: "ShippingAddressId"); | |||
migrationBuilder.CreateIndex( | |||
name: "IX_OrderItem_OrderId", | |||
table: "OrderItem", | |||
column: "OrderId"); | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.DropSequence( | |||
name: "OrderSequences", | |||
schema: "shared"); | |||
migrationBuilder.DropTable( | |||
name: "OrderItem"); | |||
migrationBuilder.DropTable( | |||
name: "Orders"); | |||
migrationBuilder.DropTable( | |||
name: "Address"); | |||
} | |||
} | |||
} |
@ -1,121 +0,0 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
namespace Ordering.API.Migrations | |||
{ | |||
[DbContext(typeof(OrderingDbContext))] | |||
[Migration("20161005002014_Migration_Baseline")] | |||
partial class Migration_Baseline | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431") | |||
.HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("CountryCode"); | |||
b.Property<double>("Latitude"); | |||
b.Property<double>("Longitude"); | |||
b.Property<string>("State"); | |||
b.Property<string>("StateCode"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("Address"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<Guid?>("BillingAddressId"); | |||
b.Property<Guid>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("SequenceNumber") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); | |||
b.Property<Guid?>("ShippingAddressId"); | |||
b.Property<int>("Status"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BillingAddressId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.ToTable("Orders"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("FulfillmentRemaining"); | |||
b.Property<Guid>("OrderId"); | |||
b.Property<Guid>("ProductId"); | |||
b.Property<int>("Quantity"); | |||
b.Property<decimal>("UnitPrice"); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("OrderItem"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") | |||
.WithMany() | |||
.HasForeignKey("BillingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -1,19 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
namespace Ordering.API.Migrations | |||
{ | |||
public partial class Migration_Baseline : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
} | |||
} |
@ -1,121 +0,0 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
namespace Ordering.API.Migrations | |||
{ | |||
[DbContext(typeof(OrderingDbContext))] | |||
[Migration("20161005003321_Migration_Cero")] | |||
partial class Migration_Cero | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431") | |||
.HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("CountryCode"); | |||
b.Property<double>("Latitude"); | |||
b.Property<double>("Longitude"); | |||
b.Property<string>("State"); | |||
b.Property<string>("StateCode"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("Address"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<Guid?>("BillingAddressId"); | |||
b.Property<Guid>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("SequenceNumber") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); | |||
b.Property<Guid?>("ShippingAddressId"); | |||
b.Property<int>("Status"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BillingAddressId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.ToTable("Orders"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("FulfillmentRemaining"); | |||
b.Property<Guid>("OrderId"); | |||
b.Property<Guid>("ProductId"); | |||
b.Property<int>("Quantity"); | |||
b.Property<decimal>("UnitPrice"); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("OrderItem"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") | |||
.WithMany() | |||
.HasForeignKey("BillingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -1,19 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
namespace Ordering.API.Migrations | |||
{ | |||
public partial class Migration_Cero : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
} | |||
} |
@ -1,123 +0,0 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
namespace Ordering.API.Migrations | |||
{ | |||
[DbContext(typeof(OrderingDbContext))] | |||
[Migration("20161011040943_Migration2")] | |||
partial class Migration2 | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431") | |||
.HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("CountryCode"); | |||
b.Property<double>("Latitude"); | |||
b.Property<double>("Longitude"); | |||
b.Property<string>("State"); | |||
b.Property<string>("StateCode"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("Address"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<Guid?>("BillingAddressId"); | |||
b.Property<Guid>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("SequenceNumber") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); | |||
b.Property<Guid?>("ShippingAddressId"); | |||
b.Property<int>("Status"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BillingAddressId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.ToTable("Orders"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("FulfillmentRemaining"); | |||
b.Property<Guid>("OrderId"); | |||
b.Property<Guid>("ProductId"); | |||
b.Property<string>("ProductName"); | |||
b.Property<int>("Quantity"); | |||
b.Property<decimal>("UnitPrice"); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("OrderItem"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") | |||
.WithMany() | |||
.HasForeignKey("BillingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -1,24 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
namespace Ordering.API.Migrations | |||
{ | |||
public partial class Migration2 : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.AddColumn<string>( | |||
name: "ProductName", | |||
table: "OrderItem", | |||
nullable: true); | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
migrationBuilder.DropColumn( | |||
name: "ProductName", | |||
table: "OrderItem"); | |||
} | |||
} | |||
} |
@ -1,123 +0,0 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
namespace Ordering.API.Migrations | |||
{ | |||
[DbContext(typeof(OrderingDbContext))] | |||
[Migration("20161011041130_Migration3")] | |||
partial class Migration3 | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431") | |||
.HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("CountryCode"); | |||
b.Property<double>("Latitude"); | |||
b.Property<double>("Longitude"); | |||
b.Property<string>("State"); | |||
b.Property<string>("StateCode"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("Address"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<Guid?>("BillingAddressId"); | |||
b.Property<Guid>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("SequenceNumber") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); | |||
b.Property<Guid?>("ShippingAddressId"); | |||
b.Property<int>("Status"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BillingAddressId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.ToTable("Orders"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("FulfillmentRemaining"); | |||
b.Property<Guid>("OrderId"); | |||
b.Property<Guid>("ProductId"); | |||
b.Property<string>("ProductName"); | |||
b.Property<int>("Quantity"); | |||
b.Property<decimal>("UnitPrice"); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("OrderItem"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") | |||
.WithMany() | |||
.HasForeignKey("BillingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -1,19 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
namespace Ordering.API.Migrations | |||
{ | |||
public partial class Migration3 : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
protected override void Down(MigrationBuilder migrationBuilder) | |||
{ | |||
} | |||
} | |||
} |
@ -1,122 +0,0 @@ | |||
using System; | |||
using Microsoft.EntityFrameworkCore; | |||
using Microsoft.EntityFrameworkCore.Infrastructure; | |||
using Microsoft.EntityFrameworkCore.Metadata; | |||
using Microsoft.EntityFrameworkCore.Migrations; | |||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; | |||
namespace Ordering.API.Migrations | |||
{ | |||
[DbContext(typeof(OrderingDbContext))] | |||
partial class OrderingDbContextModelSnapshot : ModelSnapshot | |||
{ | |||
protected override void BuildModel(ModelBuilder modelBuilder) | |||
{ | |||
modelBuilder | |||
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431") | |||
.HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<string>("City"); | |||
b.Property<string>("Country"); | |||
b.Property<string>("CountryCode"); | |||
b.Property<double>("Latitude"); | |||
b.Property<double>("Longitude"); | |||
b.Property<string>("State"); | |||
b.Property<string>("StateCode"); | |||
b.Property<string>("Street"); | |||
b.Property<string>("ZipCode"); | |||
b.HasKey("Id"); | |||
b.ToTable("Address"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<Guid?>("BillingAddressId"); | |||
b.Property<Guid>("BuyerId"); | |||
b.Property<DateTime>("OrderDate"); | |||
b.Property<int>("SequenceNumber") | |||
.ValueGeneratedOnAdd() | |||
.HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); | |||
b.Property<Guid?>("ShippingAddressId"); | |||
b.Property<int>("Status"); | |||
b.HasKey("Id"); | |||
b.HasIndex("BillingAddressId"); | |||
b.HasIndex("ShippingAddressId"); | |||
b.ToTable("Orders"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.Property<Guid>("Id") | |||
.ValueGeneratedOnAdd(); | |||
b.Property<decimal>("Discount"); | |||
b.Property<int>("FulfillmentRemaining"); | |||
b.Property<Guid>("OrderId"); | |||
b.Property<Guid>("ProductId"); | |||
b.Property<string>("ProductName"); | |||
b.Property<int>("Quantity"); | |||
b.Property<decimal>("UnitPrice"); | |||
b.HasKey("Id"); | |||
b.HasIndex("OrderId"); | |||
b.ToTable("OrderItem"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") | |||
.WithMany() | |||
.HasForeignKey("BillingAddressId"); | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") | |||
.WithMany() | |||
.HasForeignKey("ShippingAddressId"); | |||
}); | |||
modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => | |||
{ | |||
b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") | |||
.WithMany("OrderItems") | |||
.HasForeignKey("OrderId") | |||
.OnDelete(DeleteBehavior.Cascade); | |||
}); | |||
} | |||
} | |||
} |
@ -0,0 +1,25 @@ | |||
using System; | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Models | |||
{ | |||
public class NewOrderViewModel | |||
{ | |||
public string ShippingCity { get; set; } | |||
public string ShippingStreet { get; set; } | |||
public string ShippingState { get; set; } | |||
public string ShippingCountry { get; set; } | |||
public string CardType { get; set; } | |||
public string CardNumber { get; set; } | |||
public string CardHolderName { get; set; } | |||
public DateTime CardExpiration { get; set; } | |||
public string CardSecurityNumber { get; set; } | |||
} | |||
} |
@ -1,187 +0,0 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> | |||
<head> | |||
<meta charset="utf-8" /> | |||
<title>Welcome to ASP.NET Core</title> | |||
<style> | |||
html { | |||
background: #f1f1f1; | |||
height: 100%; | |||
} | |||
body { | |||
background: #fff; | |||
color: #505050; | |||
font: 14px 'Segoe UI', tahoma, arial, helvetica, sans-serif; | |||
margin: 1%; | |||
min-height: 95.5%; | |||
border: 1px solid silver; | |||
position: relative; | |||
} | |||
#header { | |||
padding: 0; | |||
} | |||
#header h1 { | |||
font-size: 44px; | |||
font-weight: normal; | |||
margin: 0; | |||
padding: 10px 30px 10px 30px; | |||
} | |||
#header span { | |||
margin: 0; | |||
padding: 0 30px; | |||
display: block; | |||
} | |||
#header p { | |||
font-size: 20px; | |||
color: #fff; | |||
background: #007acc; | |||
padding: 0 30px; | |||
line-height: 50px; | |||
margin-top: 25px; | |||
} | |||
#header p a { | |||
color: #fff; | |||
text-decoration: underline; | |||
font-weight: bold; | |||
padding-right: 35px; | |||
background: no-repeat right bottom url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAWCAMAAAAcqPc3AAAANlBMVEUAAAAAeswfitI9mthXp91us+KCvuaTx+mjz+2x1u+83PLH4vTR5/ba7Pjj8Pns9fv1+v3////wy3dWAAAAAXRSTlMAQObYZgAAAHxJREFUeNp9kVcSwCAIRMHUYoH7XzaxOxJ9P8oyQ1uIqNPwh3s2aLmIM2YtqrLcQIeQEylhuCeUOlhgve5yoBCfWmlnlgkN4H8ykbpaE7gR03AbUHiwoOxUH9Xp+ubd41p1HF3mBPrfC87BHeTdaB3ceeKL9HGpcvX9zu6+DdMWT9KQPvYAAAAASUVORK5CYII=); | |||
} | |||
#main { | |||
padding: 5px 30px; | |||
clear: both; | |||
} | |||
.section { | |||
width: 21.7%; | |||
float: left; | |||
margin: 0 0 0 4%; | |||
} | |||
.section h2 { | |||
font-size: 13px; | |||
text-transform: uppercase; | |||
margin: 0; | |||
border-bottom: 1px solid silver; | |||
padding-bottom: 12px; | |||
margin-bottom: 8px; | |||
} | |||
.section.first { | |||
margin-left: 0; | |||
} | |||
.section.first h2 { | |||
font-size: 24px; | |||
text-transform: none; | |||
margin-bottom: 25px; | |||
border: none; | |||
} | |||
.section.first li { | |||
border-top: 1px solid silver; | |||
padding: 8px 0; | |||
} | |||
.section.last { | |||
margin-right: 0; | |||
} | |||
ul { | |||
list-style: none; | |||
padding: 0; | |||
margin: 0; | |||
line-height: 20px; | |||
} | |||
li { | |||
padding: 4px 0; | |||
} | |||
a { | |||
color: #267cb2; | |||
text-decoration: none; | |||
} | |||
a:hover { | |||
text-decoration: underline; | |||
} | |||
#footer { | |||
clear: both; | |||
padding-top: 50px; | |||
} | |||
#footer p { | |||
position: absolute; | |||
bottom: 10px; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div id="header"> | |||
<h1>Welcome to ASP.NET Core</h1> | |||
<span> | |||
We've made some big updates in this release, so it’s <b>important</b> that you spend | |||
a few minutes to learn what’s new. | |||
</span> | |||
<p>You've created a new ASP.NET Core project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p> | |||
</div> | |||
<div id="main"> | |||
<div class="section first"> | |||
<h2>This application consists of:</h2> | |||
<ul> | |||
<li>Sample pages using ASP.NET Core MVC</li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> | |||
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> | |||
</ul> | |||
</div> | |||
<div class="section"> | |||
<h2>How to</h2> | |||
<ul> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li> | |||
</ul> | |||
</div> | |||
<div class="section"> | |||
<h2>Overview</h2> | |||
<ul> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li> | |||
</ul> | |||
</div> | |||
<div class="section last"> | |||
<h2>Run & Deploy</h2> | |||
<ul> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li> | |||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> | |||
</ul> | |||
</div> | |||
<div id="footer"> | |||
<p>We would love to hear your <a href="http://go.microsoft.com/fwlink/?LinkId=518015">feedback</a></p> | |||
</div> | |||
</div> | |||
</body> | |||
</html> |
@ -1,3 +1,3 @@ | |||
{ | |||
"ConnectionString": "Server=127.0.0.1;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;" | |||
"ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;" | |||
} |
@ -0,0 +1,110 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.Application.Commands | |||
{ | |||
using Domain.Repositories; | |||
using MediatR; | |||
using System.Linq; | |||
using System; | |||
using System.Threading.Tasks; | |||
using Domain; | |||
public class NewOrderRequestHandler | |||
: IAsyncRequestHandler<NewOrderRequest, bool> | |||
{ | |||
private readonly IBuyerRepository _buyerRepository; | |||
private readonly IOrderRepository _orderRepository; | |||
public NewOrderRequestHandler(IBuyerRepository buyerRepository,IOrderRepository orderRepository) | |||
{ | |||
if (buyerRepository == null) | |||
{ | |||
throw new ArgumentNullException(nameof(buyerRepository)); | |||
} | |||
if (orderRepository == null) | |||
{ | |||
throw new ArgumentNullException(nameof(orderRepository)); | |||
} | |||
_buyerRepository = buyerRepository; | |||
_orderRepository = orderRepository; | |||
} | |||
public async Task<bool> Handle(NewOrderRequest message) | |||
{ | |||
//find buyer/payment or add a new one | |||
var buyer = await _buyerRepository.FindAsync(message.Buyer); | |||
if (buyer == null) | |||
{ | |||
buyer = CreateBuyer(message); | |||
} | |||
var payment = GetExistingPaymentOrAddANewOne(buyer, message); | |||
await _buyerRepository.UnitOfWork.SaveChangesAsync(); | |||
//create order | |||
var order = CreateOrder(buyer.Id, payment.Id, 0); | |||
order.SetAddress( new Address() | |||
{ | |||
City = message.City, | |||
State = message.State, | |||
Street = message.Street, | |||
ZipCode = message.ZipCode | |||
}); | |||
_orderRepository.Add(order); | |||
var result = await _orderRepository.UnitOfWork.SaveChangesAsync(); | |||
return result > 0; | |||
} | |||
Payment GetExistingPaymentOrAddANewOne(Buyer buyer, NewOrderRequest message) | |||
{ | |||
Payment payment = PaymentAlreadyExist(buyer, message); | |||
if (payment == null) | |||
{ | |||
payment = CreatePayment(message); | |||
buyer.Payments.Add(payment); | |||
} | |||
return payment; | |||
} | |||
Payment PaymentAlreadyExist(Domain.Buyer buyer, NewOrderRequest message) | |||
{ | |||
return buyer.Payments | |||
.SingleOrDefault(p => | |||
{ | |||
return p.CardHolderName == message.CardHolderName | |||
&& | |||
p.CardNumber == message.CardNumber | |||
&& | |||
p.Expiration == message.CardExpiration | |||
&& | |||
p.SecurityNumber == message.CardSecurityNumber; | |||
}); | |||
} | |||
Buyer CreateBuyer(NewOrderRequest message) | |||
{ | |||
return _buyerRepository.Add( | |||
new Buyer(message.Buyer)); | |||
} | |||
Order CreateOrder(int buyerId, int paymentId, int addressId) | |||
{ | |||
return new Order(buyerId, paymentId); | |||
} | |||
Payment CreatePayment(NewOrderRequest message) | |||
{ | |||
return new Payment(message.CardNumber, message.CardSecurityNumber, message.CardHolderName, message.CardExpiration, message.CardTypeId); | |||
} | |||
} | |||
} |
@ -0,0 +1,35 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.Application.Commands | |||
{ | |||
using System; | |||
using MediatR; | |||
public class NewOrderRequest | |||
:IAsyncRequest<bool> | |||
{ | |||
public string City { get; set; } | |||
public string Street { get; set; } | |||
public string State { get; set; } | |||
public string Country { get; set; } | |||
public string ZipCode { get; set; } | |||
public string CardNumber { get; set; } | |||
public string CardHolderName { get; set; } | |||
public DateTime CardExpiration { get; set; } | |||
public string CardSecurityNumber { get; set; } | |||
public int CardTypeId { get; set; } | |||
public string Buyer { get; set; } | |||
public NewOrderRequest() | |||
{ | |||
} | |||
} | |||
} |
@ -0,0 +1,34 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.Application.Decorators | |||
{ | |||
using Extensions.Logging; | |||
using MediatR; | |||
using System.Threading.Tasks; | |||
public class LogDecorator<TRequest, TResponse> | |||
: IAsyncRequestHandler<TRequest, TResponse> | |||
where TRequest : IAsyncRequest<TResponse> | |||
{ | |||
private readonly IAsyncRequestHandler<TRequest, TResponse> _inner; | |||
private readonly ILogger<LogDecorator<TRequest, TResponse>> _logger; | |||
public LogDecorator( | |||
IAsyncRequestHandler<TRequest, TResponse> inner, | |||
ILogger<LogDecorator<TRequest, TResponse>> logger) | |||
{ | |||
_inner = inner; | |||
_logger = logger; | |||
} | |||
public async Task<TResponse> Handle(TRequest message) | |||
{ | |||
_logger.LogInformation($"Executing command {_inner.GetType().FullName}"); | |||
var response = await _inner.Handle(message); | |||
_logger.LogInformation($"Succedded executed command {_inner.GetType().FullName}"); | |||
return response; | |||
} | |||
} | |||
} |
@ -0,0 +1,13 @@ | |||
namespace Microsoft.eShopOnContainers.Services.Ordering.Application.Queries | |||
{ | |||
using System.Threading.Tasks; | |||
public interface IOrderQueries | |||
{ | |||
Task<dynamic> GetOrder(int id); | |||
Task<dynamic> GetOrders(); | |||
Task<dynamic> GetCardTypes(); | |||
} | |||
} |