├── OnionArchitecture ├── .vs │ └── config │ │ └── applicationhost.config ├── OA.Data │ ├── App.Config │ ├── Model │ │ ├── Log.cs │ │ ├── Model1.Context.cs │ │ ├── Model1.Context.tt │ │ ├── Model1.Designer.cs │ │ ├── Model1.cs │ │ ├── Model1.edmx │ │ ├── Model1.edmx.diagram │ │ ├── Model1.tt │ │ ├── Order.cs │ │ ├── Product.cs │ │ └── User.cs │ ├── OA.Data.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── EntityFramework.SqlServer.xml │ │ │ ├── EntityFramework.xml │ │ │ └── OA.Data.dll.config │ ├── obj │ │ └── Debug │ │ │ ├── OA.Data.csproj.FileListAbsolute.txt │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── edmxResourcesToEmbed │ │ │ └── Model │ │ │ ├── Model1.csdl │ │ │ ├── Model1.msl │ │ │ └── Model1.ssdl │ └── packages.config ├── OA.Repo │ ├── App.config │ ├── OA.Repo.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Repository │ │ ├── GenericRepository.cs │ │ └── IGenericRepository.cs │ ├── UoW │ │ ├── GenericUoW.cs │ │ └── IGenericUoW.cs │ ├── bin │ │ └── Debug │ │ │ ├── EntityFramework.SqlServer.xml │ │ │ ├── EntityFramework.xml │ │ │ └── OA.Repo.dll.config │ ├── obj │ │ └── Debug │ │ │ ├── OA.Repo.csproj.FileListAbsolute.txt │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── packages.config ├── OA.Service │ ├── App.config │ ├── Enumerations │ │ └── Enumerations.cs │ ├── Extensions │ │ └── Extensions.cs │ ├── Helpers │ │ └── Helpers.cs │ ├── Interfaces │ │ ├── ILoggerSrvc.cs │ │ ├── IOrderSrvc.cs │ │ ├── ISoftDeletable.cs │ │ └── IUserSrvc.cs │ ├── OA.Service.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Services │ │ ├── LoggerSrvc.cs │ │ ├── OrderSrvc.cs │ │ └── UserSrvc.cs │ ├── bin │ │ └── Debug │ │ │ ├── EntityFramework.SqlServer.xml │ │ │ ├── EntityFramework.xml │ │ │ └── OA.Service.dll.config │ ├── obj │ │ └── Debug │ │ │ ├── OA.Service.csproj.FileListAbsolute.txt │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── packages.config ├── OA.WebAPI │ ├── ActionFilters │ │ └── Filters.cs │ ├── App_Data │ │ └── sql-script.txt │ ├── App_Start │ │ ├── BundleConfig.cs │ │ ├── FilterConfig.cs │ │ ├── IdentityConfig.cs │ │ ├── RouteConfig.cs │ │ ├── Startup.Auth.cs │ │ ├── UnityConfig.cs │ │ ├── UnityWebApiActivator.cs │ │ └── WebApiConfig.cs │ ├── ApplicationInsights.config │ ├── Areas │ │ └── HelpPage │ │ │ ├── ApiDescriptionExtensions.cs │ │ │ ├── App_Start │ │ │ └── HelpPageConfig.cs │ │ │ ├── Controllers │ │ │ └── HelpController.cs │ │ │ ├── HelpPage.css │ │ │ ├── HelpPageAreaRegistration.cs │ │ │ ├── HelpPageConfigurationExtensions.cs │ │ │ ├── ModelDescriptions │ │ │ ├── CollectionModelDescription.cs │ │ │ ├── ComplexTypeModelDescription.cs │ │ │ ├── DictionaryModelDescription.cs │ │ │ ├── EnumTypeModelDescription.cs │ │ │ ├── EnumValueDescription.cs │ │ │ ├── IModelDocumentationProvider.cs │ │ │ ├── KeyValuePairModelDescription.cs │ │ │ ├── ModelDescription.cs │ │ │ ├── ModelDescriptionGenerator.cs │ │ │ ├── ModelNameAttribute.cs │ │ │ ├── ModelNameHelper.cs │ │ │ ├── ParameterAnnotation.cs │ │ │ ├── ParameterDescription.cs │ │ │ └── SimpleTypeModelDescription.cs │ │ │ ├── Models │ │ │ └── HelpPageApiModel.cs │ │ │ ├── SampleGeneration │ │ │ ├── HelpPageSampleGenerator.cs │ │ │ ├── HelpPageSampleKey.cs │ │ │ ├── ImageSample.cs │ │ │ ├── InvalidSample.cs │ │ │ ├── ObjectGenerator.cs │ │ │ ├── SampleDirection.cs │ │ │ └── TextSample.cs │ │ │ ├── Views │ │ │ ├── Help │ │ │ │ ├── Api.cshtml │ │ │ │ ├── DisplayTemplates │ │ │ │ │ ├── ApiGroup.cshtml │ │ │ │ │ ├── CollectionModelDescription.cshtml │ │ │ │ │ ├── ComplexTypeModelDescription.cshtml │ │ │ │ │ ├── DictionaryModelDescription.cshtml │ │ │ │ │ ├── EnumTypeModelDescription.cshtml │ │ │ │ │ ├── HelpPageApiModel.cshtml │ │ │ │ │ ├── ImageSample.cshtml │ │ │ │ │ ├── InvalidSample.cshtml │ │ │ │ │ ├── KeyValuePairModelDescription.cshtml │ │ │ │ │ ├── ModelDescriptionLink.cshtml │ │ │ │ │ ├── Parameters.cshtml │ │ │ │ │ ├── Samples.cshtml │ │ │ │ │ ├── SimpleTypeModelDescription.cshtml │ │ │ │ │ └── TextSample.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ └── ResourceModel.cshtml │ │ │ ├── Shared │ │ │ │ └── _Layout.cshtml │ │ │ ├── Web.config │ │ │ └── _ViewStart.cshtml │ │ │ └── XmlDocumentationProvider.cs │ ├── Content │ │ ├── Site.css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── Controllers │ │ ├── AccountController.cs │ │ ├── HomeController.cs │ │ ├── UserController.cs │ │ └── ValuesController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Handlers │ │ └── Handler.cs │ ├── Models │ │ ├── AccountBindingModels.cs │ │ ├── AccountViewModels.cs │ │ └── IdentityModels.cs │ ├── OA.WebAPI.csproj │ ├── Project_Readme.html │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Providers │ │ └── ApplicationOAuthProvider.cs │ ├── Resolver │ │ └── UnityResolver.cs │ ├── Results │ │ └── ChallengeResult.cs │ ├── Scripts │ │ ├── _references.js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-1.10.2.intellisense.js │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ ├── jquery-1.10.2.min.map │ │ ├── jquery.validate-vsdoc.js │ │ ├── jquery.validate.js │ │ ├── jquery.validate.min.js │ │ ├── jquery.validate.unobtrusive.js │ │ ├── jquery.validate.unobtrusive.min.js │ │ ├── modernizr-2.6.2.js │ │ ├── respond.js │ │ └── respond.min.js │ ├── Startup.cs │ ├── Views │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── bin │ │ ├── ApplicationInsights.config │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.xml │ │ ├── Microsoft.AI.DependencyCollector.xml │ │ ├── Microsoft.AI.ServerTelemetryChannel.xml │ │ ├── Microsoft.AI.Web.xml │ │ ├── Microsoft.AI.WindowsServer.xml │ │ ├── Microsoft.ApplicationInsights.xml │ │ ├── Microsoft.AspNet.Identity.Core.xml │ │ ├── Microsoft.AspNet.Identity.EntityFramework.xml │ │ ├── Microsoft.AspNet.Identity.Owin.xml │ │ ├── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml │ │ ├── Microsoft.Owin.Host.SystemWeb.xml │ │ ├── Microsoft.Owin.Security.Cookies.xml │ │ ├── Microsoft.Owin.Security.Facebook.xml │ │ ├── Microsoft.Owin.Security.Google.xml │ │ ├── Microsoft.Owin.Security.MicrosoftAccount.xml │ │ ├── Microsoft.Owin.Security.OAuth.xml │ │ ├── Microsoft.Owin.Security.Twitter.xml │ │ ├── Microsoft.Owin.Security.xml │ │ ├── Microsoft.Owin.xml │ │ ├── Microsoft.Practices.ServiceLocation.xml │ │ ├── Microsoft.Practices.Unity.Configuration.xml │ │ ├── Microsoft.Practices.Unity.RegistrationByConvention.xml │ │ ├── Microsoft.Practices.Unity.WebApi.xml │ │ ├── Microsoft.Practices.Unity.xml │ │ ├── Newtonsoft.Json.xml │ │ ├── OA.WebAPI.dll.config │ │ ├── System.Net.Http.Formatting.xml │ │ ├── System.Web.Helpers.xml │ │ ├── System.Web.Http.Owin.xml │ │ ├── System.Web.Http.WebHost.xml │ │ ├── System.Web.Http.xml │ │ ├── System.Web.Mvc.xml │ │ ├── System.Web.Optimization.xml │ │ ├── System.Web.Razor.xml │ │ ├── System.Web.WebPages.Deployment.xml │ │ ├── System.Web.WebPages.Razor.xml │ │ ├── System.Web.WebPages.xml │ │ └── roslyn │ │ │ ├── Microsoft.CSharp.Core.targets │ │ │ ├── Microsoft.VisualBasic.Core.targets │ │ │ └── VBCSCompiler.exe.config │ ├── favicon.ico │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── obj │ │ └── Debug │ │ │ ├── OA.WebAPI.csproj.FileListAbsolute.txt │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── packages.config ├── OnionArchitecture.sln └── packages │ ├── Antlr.3.4.1.9004 │ └── Antlr.3.4.1.9004.nupkg │ ├── CommonServiceLocator.1.3 │ ├── CommonServiceLocator.1.3.nupkg │ └── lib │ │ └── portable-net4+sl5+netcore45+wpa81+wp8 │ │ └── Microsoft.Practices.ServiceLocation.XML │ ├── EntityFramework.6.1.3 │ ├── EntityFramework.6.1.3.nupkg │ ├── content │ │ ├── App.config.transform │ │ └── Web.config.transform │ ├── lib │ │ ├── net40 │ │ │ ├── EntityFramework.SqlServer.xml │ │ │ └── EntityFramework.xml │ │ └── net45 │ │ │ ├── EntityFramework.SqlServer.xml │ │ │ └── EntityFramework.xml │ └── tools │ │ ├── EntityFramework.psd1 │ │ ├── EntityFramework.psm1 │ │ ├── about_EntityFramework.help.txt │ │ ├── init.ps1 │ │ └── install.ps1 │ ├── Microsoft.ApplicationInsights.2.2.0 │ ├── Microsoft.ApplicationInsights.2.2.0.nupkg │ └── lib │ │ ├── net40 │ │ └── Microsoft.ApplicationInsights.XML │ │ ├── net45 │ │ └── Microsoft.ApplicationInsights.XML │ │ ├── net46 │ │ └── Microsoft.ApplicationInsights.XML │ │ └── netstandard1.5 │ │ └── Microsoft.ApplicationInsights.XML │ ├── Microsoft.ApplicationInsights.Agent.Intercept.2.0.6 │ └── Microsoft.ApplicationInsights.Agent.Intercept.2.0.6.nupkg │ ├── Microsoft.ApplicationInsights.DependencyCollector.2.2.0 │ ├── Microsoft.ApplicationInsights.DependencyCollector.2.2.0.nupkg │ ├── content │ │ ├── ApplicationInsights.config.install.xdt │ │ ├── ApplicationInsights.config.transform │ │ └── ApplicationInsights.config.uninstall.xdt │ └── lib │ │ ├── net40 │ │ └── Microsoft.AI.DependencyCollector.XML │ │ └── net45 │ │ └── Microsoft.AI.DependencyCollector.XML │ ├── Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0 │ ├── Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0.nupkg │ └── content │ │ ├── ApplicationInsights.config.install.xdt │ │ ├── ApplicationInsights.config.transform │ │ └── ApplicationInsights.config.uninstall.xdt │ ├── Microsoft.ApplicationInsights.Web.2.2.0 │ ├── Microsoft.ApplicationInsights.Web.2.2.0.nupkg │ ├── content │ │ ├── net40 │ │ │ ├── ApplicationInsights.config.install.xdt │ │ │ ├── ApplicationInsights.config.transform │ │ │ ├── ApplicationInsights.config.uninstall.xdt │ │ │ ├── web.config.install.xdt │ │ │ └── web.config.uninstall.xdt │ │ └── net45 │ │ │ ├── ApplicationInsights.config.install.xdt │ │ │ ├── ApplicationInsights.config.transform │ │ │ ├── ApplicationInsights.config.uninstall.xdt │ │ │ ├── web.config.install.xdt │ │ │ └── web.config.uninstall.xdt │ └── lib │ │ ├── net40 │ │ └── Microsoft.AI.Web.XML │ │ └── net45 │ │ └── Microsoft.AI.Web.XML │ ├── Microsoft.ApplicationInsights.WindowsServer.2.2.0 │ ├── Microsoft.ApplicationInsights.WindowsServer.2.2.0.nupkg │ ├── Tools │ │ └── install.ps1 │ ├── content │ │ ├── ApplicationInsights.config.install.xdt │ │ ├── ApplicationInsights.config.transform │ │ └── ApplicationInsights.config.uninstall.xdt │ └── lib │ │ ├── net40 │ │ └── Microsoft.AI.WindowsServer.XML │ │ └── net45 │ │ └── Microsoft.AI.WindowsServer.XML │ ├── Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0 │ ├── Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0.nupkg │ ├── content │ │ ├── ApplicationInsights.config.install.xdt │ │ ├── ApplicationInsights.config.transform │ │ └── ApplicationInsights.config.uninstall.xdt │ └── lib │ │ ├── net40 │ │ └── Microsoft.AI.ServerTelemetryChannel.XML │ │ └── net45 │ │ └── Microsoft.AI.ServerTelemetryChannel.XML │ ├── Microsoft.AspNet.Identity.Core.2.2.1 │ ├── Microsoft.AspNet.Identity.Core.2.2.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.AspNet.Identity.Core.xml │ ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1 │ ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.AspNet.Identity.EntityFramework.xml │ ├── Microsoft.AspNet.Identity.Owin.2.2.1 │ ├── Microsoft.AspNet.Identity.Owin.2.2.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.AspNet.Identity.Owin.xml │ ├── Microsoft.AspNet.Mvc.5.2.3 │ ├── Content │ │ ├── Web.config.install.xdt │ │ └── Web.config.uninstall.xdt │ ├── Microsoft.AspNet.Mvc.5.2.3.nupkg │ └── lib │ │ └── net45 │ │ └── System.Web.Mvc.xml │ ├── Microsoft.AspNet.Razor.3.2.3 │ ├── Microsoft.AspNet.Razor.3.2.3.nupkg │ └── lib │ │ └── net45 │ │ └── System.Web.Razor.xml │ ├── Microsoft.AspNet.Web.Optimization.1.1.3 │ ├── Microsoft.AspNet.Web.Optimization.1.1.3.nupkg │ └── lib │ │ └── net40 │ │ └── system.web.optimization.xml │ ├── Microsoft.AspNet.WebApi.5.2.3 │ └── Microsoft.AspNet.WebApi.5.2.3.nupkg │ ├── Microsoft.AspNet.WebApi.Client.5.2.3 │ ├── Microsoft.AspNet.WebApi.Client.5.2.3.nupkg │ └── lib │ │ ├── net45 │ │ └── System.Net.Http.Formatting.xml │ │ └── portable-wp8%2Bnetcore45%2Bnet45%2Bwp81%2Bwpa81 │ │ └── System.Net.Http.Formatting.xml │ ├── Microsoft.AspNet.WebApi.Core.5.2.3 │ ├── Content │ │ └── web.config.transform │ ├── Microsoft.AspNet.WebApi.Core.5.2.3.nupkg │ └── lib │ │ └── net45 │ │ └── System.Web.Http.xml │ ├── Microsoft.AspNet.WebApi.HelpPage.5.2.3 │ ├── Content │ │ └── Areas │ │ │ └── HelpPage │ │ │ ├── ApiDescriptionExtensions.cs.pp │ │ │ ├── App_Start │ │ │ └── HelpPageConfig.cs.pp │ │ │ ├── Controllers │ │ │ └── HelpController.cs.pp │ │ │ ├── HelpPage.css.pp │ │ │ ├── HelpPageAreaRegistration.cs.pp │ │ │ ├── HelpPageConfigurationExtensions.cs.pp │ │ │ ├── ModelDescriptions │ │ │ ├── CollectionModelDescription.cs.pp │ │ │ ├── ComplexTypeModelDescription.cs.pp │ │ │ ├── DictionaryModelDescription.cs.pp │ │ │ ├── EnumTypeModelDescription.cs.pp │ │ │ ├── EnumValueDescription.cs.pp │ │ │ ├── IModelDocumentationProvider.cs.pp │ │ │ ├── KeyValuePairModelDescription.cs.pp │ │ │ ├── ModelDescription.cs.pp │ │ │ ├── ModelDescriptionGenerator.cs.pp │ │ │ ├── ModelNameAttribute.cs.pp │ │ │ ├── ModelNameHelper.cs.pp │ │ │ ├── ParameterAnnotation.cs.pp │ │ │ ├── ParameterDescription.cs.pp │ │ │ └── SimpleTypeModelDescription.cs.pp │ │ │ ├── Models │ │ │ └── HelpPageApiModel.cs.pp │ │ │ ├── SampleGeneration │ │ │ ├── HelpPageSampleGenerator.cs.pp │ │ │ ├── HelpPageSampleKey.cs.pp │ │ │ ├── ImageSample.cs.pp │ │ │ ├── InvalidSample.cs.pp │ │ │ ├── ObjectGenerator.cs.pp │ │ │ ├── SampleDirection.cs.pp │ │ │ └── TextSample.cs.pp │ │ │ ├── Views │ │ │ ├── Help │ │ │ │ ├── Api.cshtml.pp │ │ │ │ ├── DisplayTemplates │ │ │ │ │ ├── ApiGroup.cshtml.pp │ │ │ │ │ ├── CollectionModelDescription.cshtml.pp │ │ │ │ │ ├── ComplexTypeModelDescription.cshtml.pp │ │ │ │ │ ├── DictionaryModelDescription.cshtml.pp │ │ │ │ │ ├── EnumTypeModelDescription.cshtml.pp │ │ │ │ │ ├── HelpPageApiModel.cshtml.pp │ │ │ │ │ ├── ImageSample.cshtml.pp │ │ │ │ │ ├── InvalidSample.cshtml.pp │ │ │ │ │ ├── KeyValuePairModelDescription.cshtml.pp │ │ │ │ │ ├── ModelDescriptionLink.cshtml.pp │ │ │ │ │ ├── Parameters.cshtml.pp │ │ │ │ │ ├── Samples.cshtml.pp │ │ │ │ │ ├── SimpleTypeModelDescription.cshtml.pp │ │ │ │ │ └── TextSample.cshtml.pp │ │ │ │ ├── Index.cshtml.pp │ │ │ │ └── ResourceModel.cshtml.pp │ │ │ ├── Shared │ │ │ │ └── _Layout.cshtml.pp │ │ │ ├── Web.config │ │ │ └── _ViewStart.cshtml.pp │ │ │ └── XmlDocumentationProvider.cs.pp │ └── Microsoft.AspNet.WebApi.HelpPage.5.2.3.nupkg │ ├── Microsoft.AspNet.WebApi.Owin.5.2.3 │ ├── Microsoft.AspNet.WebApi.Owin.5.2.3.nupkg │ └── lib │ │ └── net45 │ │ └── System.Web.Http.Owin.xml │ ├── Microsoft.AspNet.WebApi.WebHost.5.2.3 │ ├── Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg │ └── lib │ │ └── net45 │ │ └── System.Web.Http.WebHost.xml │ ├── Microsoft.AspNet.WebPages.3.2.3 │ ├── Content │ │ ├── Web.config.install.xdt │ │ └── Web.config.uninstall.xdt │ ├── Microsoft.AspNet.WebPages.3.2.3.nupkg │ └── lib │ │ └── net45 │ │ ├── System.Web.Helpers.xml │ │ ├── System.Web.WebPages.Deployment.xml │ │ ├── System.Web.WebPages.Razor.xml │ │ └── System.Web.WebPages.xml │ ├── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0 │ ├── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0.nupkg │ ├── build │ │ └── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props │ ├── content │ │ ├── web.config.install.xdt │ │ └── web.config.uninstall.xdt │ ├── lib │ │ └── net45 │ │ │ └── Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml │ └── tools │ │ ├── init.ps1 │ │ └── uninstall.ps1 │ ├── Microsoft.Net.Compilers.1.0.0 │ ├── Microsoft.Net.Compilers.1.0.0.nupkg │ ├── ThirdPartyNotices.rtf │ ├── build │ │ └── Microsoft.Net.Compilers.props │ └── tools │ │ ├── Microsoft.CSharp.Core.targets │ │ ├── Microsoft.VisualBasic.Core.targets │ │ └── VBCSCompiler.exe.config │ ├── Microsoft.Owin.3.0.1 │ ├── Microsoft.Owin.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.XML │ ├── Microsoft.Owin.Host.SystemWeb.3.0.1 │ ├── Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Host.SystemWeb.xml │ ├── Microsoft.Owin.Security.3.0.1 │ ├── Microsoft.Owin.Security.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.XML │ ├── Microsoft.Owin.Security.Cookies.3.0.1 │ ├── Microsoft.Owin.Security.Cookies.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.Cookies.xml │ ├── Microsoft.Owin.Security.Facebook.3.0.1 │ ├── Microsoft.Owin.Security.Facebook.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.Facebook.XML │ ├── Microsoft.Owin.Security.Google.3.0.1 │ ├── Microsoft.Owin.Security.Google.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.Google.XML │ ├── Microsoft.Owin.Security.MicrosoftAccount.3.0.1 │ ├── Microsoft.Owin.Security.MicrosoftAccount.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.MicrosoftAccount.XML │ ├── Microsoft.Owin.Security.OAuth.3.0.1 │ ├── Microsoft.Owin.Security.OAuth.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.OAuth.XML │ ├── Microsoft.Owin.Security.Twitter.3.0.1 │ ├── Microsoft.Owin.Security.Twitter.3.0.1.nupkg │ └── lib │ │ └── net45 │ │ └── Microsoft.Owin.Security.Twitter.XML │ ├── Microsoft.Web.Infrastructure.1.0.0.0 │ └── Microsoft.Web.Infrastructure.1.0.0.0.nupkg │ ├── Microsoft.jQuery.Unobtrusive.Validation.3.2.3 │ ├── Content │ │ └── Scripts │ │ │ ├── jquery.validate.unobtrusive.js │ │ │ └── jquery.validate.unobtrusive.min.js │ └── Microsoft.jQuery.Unobtrusive.Validation.3.2.3.nupkg │ ├── Modernizr.2.6.2 │ ├── Content │ │ └── Scripts │ │ │ └── modernizr-2.6.2.js │ ├── Modernizr.2.6.2.nupkg │ └── Tools │ │ ├── common.ps1 │ │ ├── install.ps1 │ │ └── uninstall.ps1 │ ├── Newtonsoft.Json.6.0.4 │ ├── Newtonsoft.Json.6.0.4.nupkg │ ├── lib │ │ ├── net20 │ │ │ └── Newtonsoft.Json.xml │ │ ├── net35 │ │ │ └── Newtonsoft.Json.xml │ │ ├── net40 │ │ │ └── Newtonsoft.Json.xml │ │ ├── net45 │ │ │ └── Newtonsoft.Json.xml │ │ ├── netcore45 │ │ │ └── Newtonsoft.Json.xml │ │ ├── portable-net40%2Bsl5%2Bwp80%2Bwin8%2Bwpa81 │ │ │ └── Newtonsoft.Json.xml │ │ └── portable-net45%2Bwp80%2Bwin8%2Bwpa81 │ │ │ └── Newtonsoft.Json.xml │ └── tools │ │ └── install.ps1 │ ├── Owin.1.0 │ └── Owin.1.0.nupkg │ ├── Respond.1.2.0 │ ├── Respond.1.2.0.nupkg │ └── content │ │ └── Scripts │ │ ├── respond.js │ │ └── respond.min.js │ ├── Unity.4.0.1 │ ├── Unity.4.0.1.nupkg │ ├── UnityConfiguration30.xsd │ └── lib │ │ ├── net45 │ │ ├── Microsoft.Practices.Unity.Configuration.XML │ │ ├── Microsoft.Practices.Unity.RegistrationByConvention.XML │ │ └── Microsoft.Practices.Unity.xml │ │ ├── portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10 │ │ └── Microsoft.Practices.Unity.xml │ │ ├── win8 │ │ ├── Microsoft.Practices.Unity.RegistrationByConvention.XML │ │ ├── Microsoft.Practices.Unity.RegistrationByConvention.pri │ │ └── Microsoft.Practices.Unity.xml │ │ └── wp80 │ │ ├── Microsoft.Practices.Unity.RegistrationByConvention.XML │ │ └── Microsoft.Practices.Unity.xml │ ├── Unity.AspNet.WebApi.4.0.1 │ ├── Unity.AspNet.WebApi.4.0.1.nupkg │ ├── content │ │ └── App_Start │ │ │ ├── UnityConfig.cs.pp │ │ │ └── UnityWebApiActivator.cs.pp │ └── lib │ │ └── net45 │ │ └── Microsoft.Practices.Unity.WebApi.XML │ ├── WebActivatorEx.2.0 │ └── WebActivatorEx.2.0.nupkg │ ├── WebGrease.1.5.2 │ └── WebGrease.1.5.2.nupkg │ ├── bootstrap.3.0.0 │ ├── bootstrap.3.0.0.nupkg │ └── content │ │ ├── Content │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ │ ├── Scripts │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── jQuery.1.10.2 │ ├── Content │ │ └── Scripts │ │ │ ├── jquery-1.10.2-vsdoc.js │ │ │ ├── jquery-1.10.2.js │ │ │ ├── jquery-1.10.2.min.js │ │ │ └── jquery-1.10.2.min.map │ ├── Tools │ │ ├── common.ps1 │ │ ├── install.ps1 │ │ ├── jquery-1.10.2.intellisense.js │ │ └── uninstall.ps1 │ └── jQuery.1.10.2.nupkg │ └── jQuery.Validation.1.11.1 │ ├── Content │ └── Scripts │ │ ├── jquery.validate-vsdoc.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jQuery.Validation.1.11.1.nupkg └── README.md /OnionArchitecture/OA.Data/App.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Log.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace OA.Data.Model 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Log 16 | { 17 | public long Id { get; set; } 18 | public Nullable UserId { get; set; } 19 | public string RequestIpAddress { get; set; } 20 | public string RequestUri { get; set; } 21 | public string RequestMethod { get; set; } 22 | public string RequestPostData { get; set; } 23 | public Nullable RequestTimestamp { get; set; } 24 | public string ResponseStatusCode { get; set; } 25 | public string ResponseReasonPhrase { get; set; } 26 | public string ResponseErrorMessage { get; set; } 27 | public Nullable ResponseTimestamp { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Model1.Context.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace OA.Data.Model 11 | { 12 | using System; 13 | using System.Data.Entity; 14 | using System.Data.Entity.Infrastructure; 15 | 16 | public partial class OnionArchitectureEntities : DbContext 17 | { 18 | public OnionArchitectureEntities() 19 | : base("name=OnionArchitectureEntities") 20 | { 21 | } 22 | 23 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 24 | { 25 | throw new UnintentionalCodeFirstException(); 26 | } 27 | 28 | public virtual DbSet Orders { get; set; } 29 | public virtual DbSet Products { get; set; } 30 | public virtual DbSet Users { get; set; } 31 | public virtual DbSet Logs { get; set; } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Model1.Designer.cs: -------------------------------------------------------------------------------- 1 | // T4 code generation is enabled for model 'D:\OnionArchitecture\OnionArchitecture\OA.Data\Model\Model1.edmx'. 2 | // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer 3 | // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model 4 | // is open in the designer. 5 | 6 | // If no context and entity classes have been generated, it may be because you created an empty model but 7 | // have not yet chosen which version of Entity Framework to use. To generate a context class and entity 8 | // classes for your model, open the model in the designer, right-click on the designer surface, and 9 | // select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation 10 | // Item...'. -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Model1.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Model1.edmx.diagram: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Order.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace OA.Data.Model 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Order 16 | { 17 | public long Id { get; set; } 18 | public long UserId { get; set; } 19 | public long ProductId { get; set; } 20 | 21 | public virtual Product Product { get; set; } 22 | public virtual User User { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/Product.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace OA.Data.Model 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class Product 16 | { 17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] 18 | public Product() 19 | { 20 | this.Orders = new HashSet(); 21 | } 22 | 23 | public long Id { get; set; } 24 | public string Name { get; set; } 25 | 26 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] 27 | public virtual ICollection Orders { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Model/User.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated from a template. 4 | // 5 | // Manual changes to this file may cause unexpected behavior in your application. 6 | // Manual changes to this file will be overwritten if the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace OA.Data.Model 11 | { 12 | using System; 13 | using System.Collections.Generic; 14 | 15 | public partial class User 16 | { 17 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] 18 | public User() 19 | { 20 | this.Orders = new HashSet(); 21 | } 22 | 23 | public long Id { get; set; } 24 | public string Title { get; set; } 25 | public string FirstName { get; set; } 26 | public string LastName { get; set; } 27 | public string Role { get; set; } 28 | public string Mobile { get; set; } 29 | public string Email { get; set; } 30 | public string PasswordHash { get; set; } 31 | public string SecurityStamp { get; set; } 32 | public string IPAddress { get; set; } 33 | public long CreatedBy { get; set; } 34 | public System.DateTime CreatedDate { get; set; } 35 | public Nullable ModifiedBy { get; set; } 36 | public Nullable ModifiedDate { get; set; } 37 | public bool IsForgotPSWD { get; set; } 38 | public bool IsDeleted { get; set; } 39 | 40 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] 41 | public virtual ICollection Orders { get; set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OA.Data")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OA.Data")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a62da497-6df8-42e7-837c-d65aa66b2460")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/bin/Debug/OA.Data.dll.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/obj/Debug/OA.Data.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\OA.Data.dll.config 2 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\OA.Data.dll 3 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\OA.Data.pdb 4 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\EntityFramework.dll 5 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\EntityFramework.SqlServer.dll 6 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\EntityFramework.xml 7 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\EntityFramework.SqlServer.xml 8 | D:\OnionArchitecture\OnionArchitecture\OA.Data\obj\Debug\OA.Data.dll 9 | D:\OnionArchitecture\OnionArchitecture\OA.Data\obj\Debug\OA.Data.pdb 10 | D:\OnionArchitecture\OnionArchitecture\OA.Data\obj\Debug\OA.Data.csprojResolveAssemblyReference.cache 11 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\OA.Data.dll.CodeAnalysisLog.xml 12 | D:\OnionArchitecture\OnionArchitecture\OA.Data\bin\Debug\OA.Data.dll.lastcodeanalysissucceeded 13 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Data/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Data/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Data/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Data/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OA.Repo")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OA.Repo")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4f6644cf-acc2-4a48-8d4c-2d8752f839b6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/Repository/IGenericRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Linq.Expressions; 6 | 7 | namespace OA.Repo.Repository 8 | { 9 | public interface IGenericRepository where T : class 10 | { 11 | /// 12 | /// Get all entities from db 13 | /// 14 | /// 15 | /// 16 | /// 17 | /// 18 | List Get( 19 | Expression> filter = null, 20 | Func, IOrderedQueryable> orderBy = null, 21 | params Expression>[] includes); 22 | /// 23 | /// Get query for entity 24 | /// 25 | /// 26 | /// 27 | /// 28 | IQueryable Query( 29 | Expression> filter = null, 30 | Func, 31 | IOrderedQueryable> orderBy = null); 32 | /// 33 | /// Get single entity by primary key 34 | /// 35 | /// 36 | /// 37 | Task GetById(object id); 38 | /// 39 | /// Get first or default entity by filter 40 | /// 41 | /// 42 | /// 43 | /// 44 | T GetFirstOrDefault( 45 | Expression> filter = null, 46 | params Expression>[] includes); 47 | /// 48 | /// Insert entity to db 49 | /// 50 | /// 51 | void Insert(T entity); 52 | /// 53 | /// Update entity in db 54 | /// 55 | /// 56 | Task Update(T entity); 57 | /// 58 | /// Delete entity from db by primary key 59 | /// 60 | /// 61 | Task Delete(T entity); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/UoW/GenericUoW.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using OA.Data.Model; 7 | using OA.Repo.Repository; 8 | 9 | namespace OA.Repo.UoW 10 | { 11 | public class GenericUoW : IGenericUoW, IDisposable 12 | { 13 | private readonly OnionArchitectureEntities _context; 14 | public Dictionary repositories = new Dictionary(); 15 | private DbContextTransaction _transaction; 16 | /// 17 | /// 18 | /// 19 | /// 20 | public GenericUoW() 21 | { 22 | this._context = new OnionArchitectureEntities(); 23 | } 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | public IGenericRepository GenericRepository() where T : class 30 | { 31 | if (repositories.Keys.Contains(typeof(T)) == true) 32 | { 33 | return repositories[typeof(T)] as IGenericRepository; 34 | } 35 | IGenericRepository repo = new GenericRepository(_context); 36 | repositories.Add(typeof(T), repo); 37 | return repo; 38 | } 39 | /// 40 | /// 41 | /// 42 | /// 43 | public DbContextTransaction BeginTransaction() 44 | { 45 | _transaction = _context.Database.BeginTransaction(); 46 | return _transaction; 47 | } 48 | /// 49 | /// 50 | /// 51 | /// 52 | public Int64 SaveChanges() 53 | { 54 | return _context.SaveChanges(); 55 | } 56 | /// 57 | /// IDisposable implementation 58 | /// 59 | private bool disposed = false; 60 | /// 61 | /// 62 | /// 63 | /// 64 | protected virtual void Dispose(bool disposing) 65 | { 66 | if (!this.disposed) 67 | { 68 | if (disposing) 69 | { 70 | _context.Dispose(); 71 | } 72 | } 73 | } 74 | /// 75 | /// 76 | /// 77 | public void Dispose() 78 | { 79 | Dispose(true); 80 | GC.SuppressFinalize(this); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/UoW/IGenericUoW.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using OA.Repo.Repository; 4 | 5 | namespace OA.Repo.UoW 6 | { 7 | public interface IGenericUoW 8 | { 9 | IGenericRepository GenericRepository() where T : class; 10 | DbContextTransaction BeginTransaction(); 11 | Int64 SaveChanges(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/bin/Debug/OA.Repo.dll.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/obj/Debug/OA.Repo.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Repo.dll.config 2 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Repo.dll 3 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Repo.pdb 4 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\EntityFramework.dll 5 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\EntityFramework.SqlServer.dll 6 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Data.dll 7 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\EntityFramework.xml 8 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\EntityFramework.SqlServer.xml 9 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Data.pdb 10 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\obj\Debug\OA.Repo.csprojResolveAssemblyReference.cache 11 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\obj\Debug\OA.Repo.dll 12 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\obj\Debug\OA.Repo.pdb 13 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Repo.dll.CodeAnalysisLog.xml 14 | D:\OnionArchitecture\OnionArchitecture\OA.Repo\bin\Debug\OA.Repo.dll.lastcodeanalysissucceeded 15 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Repo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Repo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Repo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Repo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Enumerations/Enumerations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace OA.Service.Enumerations 8 | { 9 | class Enumerations 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Interfaces/ILoggerSrvc.cs: -------------------------------------------------------------------------------- 1 | using OA.Data.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace OA.Service.Interfaces 9 | { 10 | public interface ILoggerSrvc 11 | { 12 | void Insert(Log log); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Interfaces/IOrderSrvc.cs: -------------------------------------------------------------------------------- 1 | using OA.Data.Model; 2 | 3 | namespace OA.Service.Interfaces 4 | { 5 | public interface IOrderSrvc 6 | { 7 | void InsertOrder(Order order); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Interfaces/ISoftDeletable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace OA.Service.Interfaces 8 | { 9 | public interface ISoftDeletable 10 | { 11 | bool IsDeleted { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Interfaces/IUserSrvc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using OA.Data.Model; 4 | 5 | namespace OA.Service.Interfaces 6 | { 7 | public interface IUserSrvc 8 | { 9 | User ValidateUser(string Username, string PasswordHash); 10 | IEnumerable Get(); 11 | Int64 InsertUserOrder(User user, Order order); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OA.Service")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OA.Service")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9bf486ff-4458-4aa9-9807-eb23b5827fa4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Services/LoggerSrvc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using OA.Service.Interfaces; 7 | using OA.Repo.UoW; 8 | using OA.Data.Model; 9 | 10 | namespace OA.Service.Services 11 | { 12 | public class LoggerSrvc : ILoggerSrvc 13 | { 14 | private readonly IGenericUoW _UoW; 15 | public LoggerSrvc(IGenericUoW UoW) 16 | { 17 | _UoW = UoW; 18 | } 19 | public void Insert(Log log) 20 | { 21 | _UoW.GenericRepository().Insert(log); 22 | _UoW.SaveChanges(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Services/OrderSrvc.cs: -------------------------------------------------------------------------------- 1 | using OA.Data.Model; 2 | using OA.Repo.UoW; 3 | using OA.Service.Interfaces; 4 | 5 | namespace OA.Service.Services 6 | { 7 | public class OrderSrvc : IOrderSrvc 8 | { 9 | private readonly IGenericUoW _UoW; 10 | public OrderSrvc(IGenericUoW UoW) 11 | { 12 | _UoW = UoW; 13 | } 14 | /// 15 | /// 16 | /// 17 | /// 18 | /// 19 | public void InsertOrder(Order order) 20 | { 21 | _UoW.GenericRepository().Insert(order); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/Services/UserSrvc.cs: -------------------------------------------------------------------------------- 1 | using OA.Data.Model; 2 | using OA.Repo.UoW; 3 | using OA.Service.Interfaces; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Threading.Tasks; 8 | 9 | namespace OA.Service.Services 10 | { 11 | public class UserSrvc : IUserSrvc 12 | { 13 | private readonly IGenericUoW _UoW; 14 | public UserSrvc(IGenericUoW UoW) 15 | { 16 | _UoW = UoW; 17 | } 18 | /// 19 | /// 20 | /// 21 | /// 22 | /// 23 | /// 24 | public User ValidateUser(string Username, string PasswordHash) 25 | { 26 | return _UoW.GenericRepository().GetFirstOrDefault(x => x.Email == Username && x.PasswordHash == PasswordHash); 27 | } 28 | /// 29 | /// 30 | /// 31 | /// 32 | public IEnumerable Get() 33 | { 34 | return _UoW.GenericRepository().Get().ToList(); 35 | } 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | public Int64 InsertUserOrder(User user, Order order) 42 | { 43 | Int64 uid = 0; 44 | using (var _dbtransaction = _UoW.BeginTransaction()) 45 | { 46 | try 47 | { 48 | _UoW.GenericRepository().Insert(user); 49 | _UoW.SaveChanges(); 50 | uid = user.Id; 51 | order.UserId = uid; 52 | 53 | _UoW.GenericRepository().Insert(order); 54 | _UoW.SaveChanges(); 55 | _dbtransaction.Commit(); 56 | } 57 | catch (Exception) 58 | { 59 | _dbtransaction.Rollback(); 60 | } 61 | return uid; 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/bin/Debug/OA.Service.dll.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/obj/Debug/OA.Service.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Service.dll.config 2 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Service.dll 3 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Service.pdb 4 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\EntityFramework.dll 5 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\EntityFramework.SqlServer.dll 6 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Data.dll 7 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Repo.dll 8 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\EntityFramework.xml 9 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\EntityFramework.SqlServer.xml 10 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Data.pdb 11 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Repo.pdb 12 | D:\OnionArchitecture\OnionArchitecture\OA.Service\obj\Debug\OA.Service.csprojResolveAssemblyReference.cache 13 | D:\OnionArchitecture\OnionArchitecture\OA.Service\obj\Debug\OA.Service.dll 14 | D:\OnionArchitecture\OnionArchitecture\OA.Service\obj\Debug\OA.Service.pdb 15 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Service.dll.CodeAnalysisLog.xml 16 | D:\OnionArchitecture\OnionArchitecture\OA.Service\bin\Debug\OA.Service.dll.lastcodeanalysissucceeded 17 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Service/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Service/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.Service/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.Service/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/ActionFilters/Filters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Newtonsoft.Json; 3 | using System.Net.Http; 4 | using System.Net; 5 | using System.Web.Http.Filters; 6 | using System.Web.Http.Controllers; 7 | using OA.Service.Interfaces; 8 | 9 | namespace OA.WebAPI.ActionFilters 10 | { 11 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] 12 | public class ModelStateFilter : ActionFilterAttribute 13 | { 14 | public override void OnActionExecuting(HttpActionContext actionContext) 15 | { 16 | 17 | if (!actionContext.ModelState.IsValid) 18 | actionContext.Response = actionContext.Request.CreateErrorResponse(HttpStatusCode.BadRequest, actionContext.ModelState); 19 | } 20 | } 21 | /// 22 | /// 23 | /// 24 | public class UnhandledExceptionFilter : ExceptionFilterAttribute 25 | { 26 | public override void OnException(HttpActionExecutedContext context) 27 | { 28 | HttpStatusCode status = HttpStatusCode.InternalServerError; 29 | var exType = context.Exception.GetType(); 30 | if (exType == typeof(UnauthorizedAccessException)) 31 | status = HttpStatusCode.Unauthorized; 32 | else if (exType == typeof(ArgumentException)) 33 | status = HttpStatusCode.NotFound; 34 | var apiError = new ApiErrorMessage() 35 | { 36 | RequestUri = context.Request.RequestUri.ToString(), 37 | Method = context.Request.Method.ToString(), 38 | PostData = JsonConvert.SerializeObject(context.ActionContext.ActionArguments.Values), 39 | Exception = context.Exception.Message 40 | }; 41 | // create a new response and attach our ApiError object 42 | // which now gets returned on ANY exception result 43 | var errorResponse = context.Request.CreateResponse(status, apiError); 44 | context.Response = errorResponse; 45 | base.OnException(context); 46 | } 47 | public class ApiErrorMessage 48 | { 49 | public string Version { get { return "1.0"; } } 50 | public string RequestUri { get; set; } 51 | public string Method { get; set; } 52 | public string PostData { get; set; } 53 | public string Exception { get; set; } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace OA.WebAPI 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 15 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 16 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 17 | "~/Scripts/modernizr-*")); 18 | 19 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 20 | "~/Scripts/bootstrap.js", 21 | "~/Scripts/respond.js")); 22 | 23 | bundles.Add(new StyleBundle("~/Content/css").Include( 24 | "~/Content/bootstrap.css", 25 | "~/Content/site.css")); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using OA.WebAPI.ActionFilters; 2 | using OA.WebAPI.Handlers; 3 | using System.Web; 4 | using System.Web.Mvc; 5 | 6 | namespace OA.WebAPI 7 | { 8 | public class FilterConfig 9 | { 10 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 11 | { 12 | filters.Add(new HandleErrorAttribute()); 13 | 14 | // Custom action filter 15 | //filters.Add(new ModelStateFilter()); 16 | //filters.Add(new UnhandledExceptionFilter()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/IdentityConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNet.Identity; 3 | using Microsoft.AspNet.Identity.EntityFramework; 4 | using Microsoft.AspNet.Identity.Owin; 5 | using Microsoft.Owin; 6 | using OA.WebAPI.Models; 7 | 8 | namespace OA.WebAPI 9 | { 10 | // Configure the application user manager used in this application. UserManager is defined in ASP.NET Identity and is used by the application. 11 | 12 | public class ApplicationUserManager : UserManager 13 | { 14 | public ApplicationUserManager(IUserStore store) 15 | : base(store) 16 | { 17 | } 18 | 19 | public static ApplicationUserManager Create(IdentityFactoryOptions options, IOwinContext context) 20 | { 21 | var manager = new ApplicationUserManager(new UserStore(context.Get())); 22 | // Configure validation logic for usernames 23 | manager.UserValidator = new UserValidator(manager) 24 | { 25 | AllowOnlyAlphanumericUserNames = false, 26 | RequireUniqueEmail = true 27 | }; 28 | // Configure validation logic for passwords 29 | manager.PasswordValidator = new PasswordValidator 30 | { 31 | RequiredLength = 6, 32 | RequireNonLetterOrDigit = true, 33 | RequireDigit = true, 34 | RequireLowercase = true, 35 | RequireUppercase = true, 36 | }; 37 | var dataProtectionProvider = options.DataProtectionProvider; 38 | if (dataProtectionProvider != null) 39 | { 40 | manager.UserTokenProvider = new DataProtectorTokenProvider(dataProtectionProvider.Create("ASP.NET Identity")); 41 | } 42 | return manager; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace OA.WebAPI 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/UnityConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Practices.Unity; 3 | 4 | namespace OA.WebAPI.App_Start 5 | { 6 | /// 7 | /// Specifies the Unity configuration for the main container. 8 | /// 9 | public class UnityConfig 10 | { 11 | #region Unity Container 12 | private static Lazy container = new Lazy(() => 13 | { 14 | var container = new UnityContainer(); 15 | RegisterTypes(container); 16 | return container; 17 | }); 18 | 19 | /// 20 | /// Gets the configured Unity container. 21 | /// 22 | public static IUnityContainer GetConfiguredContainer() 23 | { 24 | return container.Value; 25 | } 26 | #endregion 27 | 28 | /// Registers the type mappings with the Unity container. 29 | /// The unity container to configure. 30 | /// There is no need to register concrete types such as controllers or API controllers (unless you want to 31 | /// change the defaults), as Unity allows resolving a concrete type even if it was not previously registered. 32 | public static void RegisterTypes(IUnityContainer container) 33 | { 34 | // NOTE: To load from web.config uncomment the line below. Make sure to add a Microsoft.Practices.Unity.Configuration to the using statements. 35 | // container.LoadConfiguration(); 36 | 37 | // TODO: Register your types here 38 | // container.RegisterType(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/UnityWebApiActivator.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using Microsoft.Practices.Unity.WebApi; 3 | 4 | [assembly: WebActivatorEx.PreApplicationStartMethod(typeof(OA.WebAPI.App_Start.UnityWebApiActivator), "Start")] 5 | [assembly: WebActivatorEx.ApplicationShutdownMethod(typeof(OA.WebAPI.App_Start.UnityWebApiActivator), "Shutdown")] 6 | 7 | namespace OA.WebAPI.App_Start 8 | { 9 | /// Provides the bootstrapping for integrating Unity with WebApi when it is hosted in ASP.NET 10 | public static class UnityWebApiActivator 11 | { 12 | /// Integrates Unity when the application starts. 13 | public static void Start() 14 | { 15 | // Use UnityHierarchicalDependencyResolver if you want to use a new child container for each IHttpController resolution. 16 | // var resolver = new UnityHierarchicalDependencyResolver(UnityConfig.GetConfiguredContainer()); 17 | var resolver = new UnityDependencyResolver(UnityConfig.GetConfiguredContainer()); 18 | 19 | GlobalConfiguration.Configuration.DependencyResolver = resolver; 20 | } 21 | 22 | /// Disposes the Unity container when the application is shut down. 23 | public static void Shutdown() 24 | { 25 | var container = UnityConfig.GetConfiguredContainer(); 26 | container.Dispose(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.Http; 5 | using System.Web.Http; 6 | using Microsoft.Owin.Security.OAuth; 7 | using Newtonsoft.Json.Serialization; 8 | using Microsoft.Practices.Unity; 9 | using OA.Service.Interfaces; 10 | using OA.WebAPI.Resolver; 11 | using OA.Service.Services; 12 | using OA.Repo.UoW; 13 | using OA.WebAPI.Handlers; 14 | using OA.WebAPI.ActionFilters; 15 | 16 | namespace OA.WebAPI 17 | { 18 | public static class WebApiConfig 19 | { 20 | public static void Register(HttpConfiguration config) 21 | { 22 | // Web API configuration and services 23 | // Configure Web API to use only bearer token authentication. 24 | config.SuppressDefaultHostAuthentication(); 25 | config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType)); 26 | 27 | // Web API routes 28 | config.MapHttpAttributeRoutes(); 29 | config.Routes.MapHttpRoute( 30 | name: "DefaultApi", 31 | routeTemplate: "api/{controller}/{id}", 32 | defaults: new { id = RouteParameter.Optional } 33 | ); 34 | 35 | // Validate application model state 36 | config.Filters.Add(new ModelStateFilter()); 37 | // Filter all un handeled exception throughout the application. 38 | config.Filters.Add(new UnhandledExceptionFilter()); 39 | // Handler for request and response logging. 40 | config.MessageHandlers.Add(new LogRequestAndResponseHandler()); 41 | 42 | 43 | // Web API configuration and services 44 | var container = new UnityContainer(); 45 | //container.RegisterType(new HierarchicalLifetimeManager()); 46 | container.RegisterType(new HierarchicalLifetimeManager()); 47 | container.RegisterType(new HierarchicalLifetimeManager()); 48 | container.RegisterType(new HierarchicalLifetimeManager()); 49 | config.DependencyResolver = new UnityResolver(container); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ApiDescriptionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace OA.WebAPI.Areas.HelpPage 7 | { 8 | public static class ApiDescriptionExtensions 9 | { 10 | /// 11 | /// Generates an URI-friendly ID for the . E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}" 12 | /// 13 | /// The . 14 | /// The ID as a string. 15 | public static string GetFriendlyId(this ApiDescription description) 16 | { 17 | string path = description.RelativePath; 18 | string[] urlParts = path.Split('?'); 19 | string localPath = urlParts[0]; 20 | string queryKeyString = null; 21 | if (urlParts.Length > 1) 22 | { 23 | string query = urlParts[1]; 24 | string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys; 25 | queryKeyString = String.Join("_", queryKeys); 26 | } 27 | 28 | StringBuilder friendlyPath = new StringBuilder(); 29 | friendlyPath.AppendFormat("{0}-{1}", 30 | description.HttpMethod.Method, 31 | localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty)); 32 | if (queryKeyString != null) 33 | { 34 | friendlyPath.AppendFormat("_{0}", queryKeyString.Replace('.', '-')); 35 | } 36 | return friendlyPath.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Controllers/HelpController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using OA.WebAPI.Areas.HelpPage.ModelDescriptions; 5 | using OA.WebAPI.Areas.HelpPage.Models; 6 | 7 | namespace OA.WebAPI.Areas.HelpPage.Controllers 8 | { 9 | /// 10 | /// The controller that will handle requests for the help page. 11 | /// 12 | public class HelpController : Controller 13 | { 14 | private const string ErrorViewName = "Error"; 15 | 16 | public HelpController() 17 | : this(GlobalConfiguration.Configuration) 18 | { 19 | } 20 | 21 | public HelpController(HttpConfiguration config) 22 | { 23 | Configuration = config; 24 | } 25 | 26 | public HttpConfiguration Configuration { get; private set; } 27 | 28 | public ActionResult Index() 29 | { 30 | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); 31 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 32 | } 33 | 34 | public ActionResult Api(string apiId) 35 | { 36 | if (!String.IsNullOrEmpty(apiId)) 37 | { 38 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 39 | if (apiModel != null) 40 | { 41 | return View(apiModel); 42 | } 43 | } 44 | 45 | return View(ErrorViewName); 46 | } 47 | 48 | public ActionResult ResourceModel(string modelName) 49 | { 50 | if (!String.IsNullOrEmpty(modelName)) 51 | { 52 | ModelDescriptionGenerator modelDescriptionGenerator = Configuration.GetModelDescriptionGenerator(); 53 | ModelDescription modelDescription; 54 | if (modelDescriptionGenerator.GeneratedModels.TryGetValue(modelName, out modelDescription)) 55 | { 56 | return View(modelDescription); 57 | } 58 | } 59 | 60 | return View(ErrorViewName); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/HelpPageAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace OA.WebAPI.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class CollectionModelDescription : ModelDescription 4 | { 5 | public ModelDescription ElementDescription { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ComplexTypeModelDescription : ModelDescription 6 | { 7 | public ComplexTypeModelDescription() 8 | { 9 | Properties = new Collection(); 10 | } 11 | 12 | public Collection Properties { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class EnumTypeModelDescription : ModelDescription 7 | { 8 | public EnumTypeModelDescription() 9 | { 10 | Values = new Collection(); 11 | } 12 | 13 | public Collection Values { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs: -------------------------------------------------------------------------------- 1 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class EnumValueDescription 4 | { 5 | public string Documentation { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public string Value { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 5 | { 6 | public interface IModelDocumentationProvider 7 | { 8 | string GetDocumentation(MemberInfo member); 9 | 10 | string GetDocumentation(Type type); 11 | } 12 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class KeyValuePairModelDescription : ModelDescription 4 | { 5 | public ModelDescription KeyModelDescription { get; set; } 6 | 7 | public ModelDescription ValueModelDescription { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/ModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Describes a type model. 7 | /// 8 | public abstract class ModelDescription 9 | { 10 | public string Documentation { get; set; } 11 | 12 | public Type ModelType { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Use this attribute to change the name of the generated for a type. 7 | /// 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)] 9 | public sealed class ModelNameAttribute : Attribute 10 | { 11 | public ModelNameAttribute(string name) 12 | { 13 | Name = name; 14 | } 15 | 16 | public string Name { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 7 | { 8 | internal static class ModelNameHelper 9 | { 10 | // Modify this to provide custom model name mapping. 11 | public static string GetModelName(Type type) 12 | { 13 | ModelNameAttribute modelNameAttribute = type.GetCustomAttribute(); 14 | if (modelNameAttribute != null && !String.IsNullOrEmpty(modelNameAttribute.Name)) 15 | { 16 | return modelNameAttribute.Name; 17 | } 18 | 19 | string modelName = type.Name; 20 | if (type.IsGenericType) 21 | { 22 | // Format the generic type name to something like: GenericOfAgurment1AndArgument2 23 | Type genericType = type.GetGenericTypeDefinition(); 24 | Type[] genericArguments = type.GetGenericArguments(); 25 | string genericTypeName = genericType.Name; 26 | 27 | // Trim the generic parameter counts from the name 28 | genericTypeName = genericTypeName.Substring(0, genericTypeName.IndexOf('`')); 29 | string[] argumentTypeNames = genericArguments.Select(t => GetModelName(t)).ToArray(); 30 | modelName = String.Format(CultureInfo.InvariantCulture, "{0}Of{1}", genericTypeName, String.Join("And", argumentTypeNames)); 31 | } 32 | 33 | return modelName; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ParameterAnnotation 6 | { 7 | public Attribute AnnotationAttribute { get; set; } 8 | 9 | public string Documentation { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class ParameterDescription 7 | { 8 | public ParameterDescription() 9 | { 10 | Annotations = new Collection(); 11 | } 12 | 13 | public Collection Annotations { get; private set; } 14 | 15 | public string Documentation { get; set; } 16 | 17 | public string Name { get; set; } 18 | 19 | public ModelDescription TypeDescription { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/SampleGeneration/InvalidSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/SampleGeneration/SampleDirection.cs: -------------------------------------------------------------------------------- 1 | namespace OA.WebAPI.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/SampleGeneration/TextSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OA.WebAPI.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/Api.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using OA.WebAPI.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 | 11 |
12 | 19 |
20 | @Html.DisplayForModel() 21 |
22 |
23 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using OA.WebAPI.Areas.HelpPage 5 | @using OA.WebAPI.Areas.HelpPage.Models 6 | @model IGrouping 7 | 8 | @{ 9 | var controllerDocumentation = ViewBag.DocumentationProvider != null ? 10 | ViewBag.DocumentationProvider.GetDocumentation(Model.Key) : 11 | null; 12 | } 13 | 14 |

@Model.Key.ControllerName

15 | @if (!String.IsNullOrEmpty(controllerDocumentation)) 16 | { 17 |

@controllerDocumentation

18 | } 19 | 20 | 21 | 22 | 23 | 24 | @foreach (var api in Model) 25 | { 26 | 27 | 28 | 38 | 39 | } 40 | 41 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 29 | @if (api.Documentation != null) 30 | { 31 |

@api.Documentation

32 | } 33 | else 34 | { 35 |

No documentation available.

36 | } 37 |
-------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model CollectionModelDescription 3 | @if (Model.ElementDescription is ComplexTypeModelDescription) 4 | { 5 | @Html.DisplayFor(m => m.ElementDescription) 6 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model ComplexTypeModelDescription 3 | @Html.DisplayFor(m => m.Properties, "Parameters") -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model DictionaryModelDescription 3 | Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model EnumTypeModelDescription 3 | 4 |

Possible enumeration values:

5 | 6 | 7 | 8 | 9 | 10 | 11 | @foreach (EnumValueDescription value in Model.Values) 12 | { 13 | 14 | 15 | 18 | 21 | 22 | } 23 | 24 |
NameValueDescription
@value.Name 16 |

@value.Value

17 |
19 |

@value.Documentation

20 |
-------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using OA.WebAPI.Areas.HelpPage.Models 4 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 5 | @model HelpPageApiModel 6 | 7 | @{ 8 | ApiDescription description = Model.ApiDescription; 9 | } 10 |

@description.HttpMethod.Method @description.RelativePath

11 |
12 |

@description.Documentation

13 | 14 |

Request Information

15 | 16 |

URI Parameters

17 | @Html.DisplayFor(m => m.UriParameters, "Parameters") 18 | 19 |

Body Parameters

20 | 21 |

@Model.RequestDocumentation

22 | 23 | @if (Model.RequestModelDescription != null) 24 | { 25 | @Html.DisplayFor(m => m.RequestModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.RequestModelDescription }) 26 | if (Model.RequestBodyParameters != null) 27 | { 28 | @Html.DisplayFor(m => m.RequestBodyParameters, "Parameters") 29 | } 30 | } 31 | else 32 | { 33 |

None.

34 | } 35 | 36 | @if (Model.SampleRequests.Count > 0) 37 | { 38 |

Request Formats

39 | @Html.DisplayFor(m => m.SampleRequests, "Samples") 40 | } 41 | 42 |

Response Information

43 | 44 |

Resource Description

45 | 46 |

@description.ResponseDescription.Documentation

47 | 48 | @if (Model.ResourceDescription != null) 49 | { 50 | @Html.DisplayFor(m => m.ResourceDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ResourceDescription }) 51 | if (Model.ResourceProperties != null) 52 | { 53 | @Html.DisplayFor(m => m.ResourceProperties, "Parameters") 54 | } 55 | } 56 | else 57 | { 58 |

None.

59 | } 60 | 61 | @if (Model.SampleResponses.Count > 0) 62 | { 63 |

Response Formats

64 | @Html.DisplayFor(m => m.SampleResponses, "Samples") 65 | } 66 | 67 |
-------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

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

Sample not available.

13 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model KeyValuePairModelDescription 3 | Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model Type 3 | @{ 4 | ModelDescription modelDescription = ViewBag.modelDescription; 5 | if (modelDescription is ComplexTypeModelDescription || modelDescription is EnumTypeModelDescription) 6 | { 7 | if (Model == typeof(Object)) 8 | { 9 | @:Object 10 | } 11 | else 12 | { 13 | @Html.ActionLink(modelDescription.Name, "ResourceModel", "Help", new { modelName = modelDescription.Name }, null) 14 | } 15 | } 16 | else if (modelDescription is CollectionModelDescription) 17 | { 18 | var collectionDescription = modelDescription as CollectionModelDescription; 19 | var elementDescription = collectionDescription.ElementDescription; 20 | @:Collection of @Html.DisplayFor(m => elementDescription.ModelType, "ModelDescriptionLink", new { modelDescription = elementDescription }) 21 | } 22 | else 23 | { 24 | @Html.DisplayFor(m => modelDescription) 25 | } 26 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using System.Collections.ObjectModel 3 | @using System.Web.Http.Description 4 | @using System.Threading 5 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 6 | @model IList 7 | 8 | @if (Model.Count > 0) 9 | { 10 | 11 | 12 | 13 | 14 | 15 | @foreach (ParameterDescription parameter in Model) 16 | { 17 | ModelDescription modelDescription = parameter.TypeDescription; 18 | 19 | 20 | 23 | 26 | 39 | 40 | } 41 | 42 |
NameDescriptionTypeAdditional information
@parameter.Name 21 |

@parameter.Documentation

22 |
24 | @Html.DisplayFor(m => modelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = modelDescription }) 25 | 27 | @if (parameter.Annotations.Count > 0) 28 | { 29 | foreach (var annotation in parameter.Annotations) 30 | { 31 |

@annotation.Documentation

32 | } 33 | } 34 | else 35 | { 36 |

None.

37 | } 38 |
43 | } 44 | else 45 | { 46 |

None.

47 | } 48 | 49 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml: -------------------------------------------------------------------------------- 1 | @using OA.WebAPI.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using OA.WebAPI.Areas.HelpPage.Models 6 | @model Collection 7 | 8 | @{ 9 | ViewBag.Title = "ASP.NET Web API Help Page"; 10 | 11 | // Group APIs by controller 12 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); 13 | } 14 | 15 | 16 |
17 |
18 |
19 |

@ViewBag.Title

20 |
21 |
22 |
23 |
24 | 32 |
33 | @foreach (var group in apiGroups) 34 | { 35 | @Html.DisplayFor(m => group, "ApiGroup") 36 | } 37 |
38 |
39 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Help/ResourceModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using OA.WebAPI.Areas.HelpPage.ModelDescriptions 3 | @model ModelDescription 4 | 5 | 6 |
7 | 14 |

@Model.Name

15 |

@Model.Documentation

16 |
17 | @Html.DisplayFor(m => Model) 18 |
19 |
20 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Areas/HelpPage/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace OA.WebAPI.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | ViewBag.Title = "Home Page"; 14 | 15 | return View(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Controllers/ValuesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | 8 | namespace OA.WebAPI.Controllers 9 | { 10 | [Authorize] 11 | public class ValuesController : ApiController 12 | { 13 | // GET api/values 14 | public IEnumerable Get() 15 | { 16 | return new string[] { "value1", "value2" }; 17 | } 18 | 19 | // GET api/values/5 20 | public string Get(int id) 21 | { 22 | return "value"; 23 | } 24 | 25 | // POST api/values 26 | public void Post([FromBody]string value) 27 | { 28 | } 29 | 30 | // PUT api/values/5 31 | public void Put(int id, [FromBody]string value) 32 | { 33 | } 34 | 35 | // DELETE api/values/5 36 | public void Delete(int id) 37 | { 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="OA.WebAPI.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | using System.Web.Optimization; 8 | using System.Web.Routing; 9 | 10 | namespace OA.WebAPI 11 | { 12 | public class WebApiApplication : System.Web.HttpApplication 13 | { 14 | protected void Application_Start() 15 | { 16 | AreaRegistration.RegisterAllAreas(); 17 | GlobalConfiguration.Configure(WebApiConfig.Register); 18 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 19 | RouteConfig.RegisterRoutes(RouteTable.Routes); 20 | BundleConfig.RegisterBundles(BundleTable.Bundles); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Models/AccountViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OA.WebAPI.Models 5 | { 6 | // Models returned by AccountController actions. 7 | 8 | public class ExternalLoginViewModel 9 | { 10 | public string Name { get; set; } 11 | 12 | public string Url { get; set; } 13 | 14 | public string State { get; set; } 15 | } 16 | 17 | public class ManageInfoViewModel 18 | { 19 | public string LocalLoginProvider { get; set; } 20 | 21 | public string Email { get; set; } 22 | 23 | public IEnumerable Logins { get; set; } 24 | 25 | public IEnumerable ExternalLoginProviders { get; set; } 26 | } 27 | 28 | public class UserInfoViewModel 29 | { 30 | public string Email { get; set; } 31 | 32 | public bool HasRegistered { get; set; } 33 | 34 | public string LoginProvider { get; set; } 35 | } 36 | 37 | public class UserLoginInfoViewModel 38 | { 39 | public string LoginProvider { get; set; } 40 | 41 | public string ProviderKey { get; set; } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | using System.Threading.Tasks; 3 | using Microsoft.AspNet.Identity; 4 | using Microsoft.AspNet.Identity.EntityFramework; 5 | using Microsoft.AspNet.Identity.Owin; 6 | 7 | namespace OA.WebAPI.Models 8 | { 9 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 10 | public class ApplicationUser : IdentityUser 11 | { 12 | public async Task GenerateUserIdentityAsync(UserManager manager, string authenticationType) 13 | { 14 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType 15 | var userIdentity = await manager.CreateIdentityAsync(this, authenticationType); 16 | // Add custom user claims here 17 | return userIdentity; 18 | } 19 | } 20 | 21 | public class ApplicationDbContext : IdentityDbContext 22 | { 23 | public ApplicationDbContext() 24 | : base("DefaultConnection", throwIfV1Schema: false) 25 | { 26 | } 27 | 28 | public static ApplicationDbContext Create() 29 | { 30 | return new ApplicationDbContext(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OA.WebAPI")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OA.WebAPI")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ce0af1ab-1ed9-49bc-8581-57bba478f3c7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Resolver/UnityResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Web.Http.Dependencies; 4 | using Microsoft.Practices.Unity; 5 | 6 | namespace OA.WebAPI.Resolver 7 | { 8 | public class UnityResolver : IDependencyResolver 9 | { 10 | protected IUnityContainer container; 11 | 12 | public UnityResolver(IUnityContainer container) 13 | { 14 | if (container == null) 15 | { 16 | throw new ArgumentNullException("container"); 17 | } 18 | this.container = container; 19 | } 20 | 21 | public object GetService(Type serviceType) 22 | { 23 | try 24 | { 25 | return container.Resolve(serviceType); 26 | } 27 | catch (ResolutionFailedException) 28 | { 29 | return null; 30 | } 31 | } 32 | 33 | public IEnumerable GetServices(Type serviceType) 34 | { 35 | try 36 | { 37 | return container.ResolveAll(serviceType); 38 | } 39 | catch (ResolutionFailedException) 40 | { 41 | return new List(); 42 | } 43 | } 44 | 45 | public IDependencyScope BeginScope() 46 | { 47 | var child = container.CreateChildContainer(); 48 | return new UnityResolver(child); 49 | } 50 | 51 | public void Dispose() 52 | { 53 | container.Dispose(); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Results/ChallengeResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | using System.Web.Http; 9 | 10 | namespace OA.WebAPI.Results 11 | { 12 | public class ChallengeResult : IHttpActionResult 13 | { 14 | public ChallengeResult(string loginProvider, ApiController controller) 15 | { 16 | LoginProvider = loginProvider; 17 | Request = controller.Request; 18 | } 19 | 20 | public string LoginProvider { get; set; } 21 | public HttpRequestMessage Request { get; set; } 22 | 23 | public Task ExecuteAsync(CancellationToken cancellationToken) 24 | { 25 | Request.GetOwinContext().Authentication.Challenge(LoginProvider); 26 | 27 | HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.Unauthorized); 28 | response.RequestMessage = Request; 29 | return Task.FromResult(response); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/Scripts/_references.js -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Microsoft.Owin; 5 | using Owin; 6 | 7 | [assembly: OwinStartup(typeof(OA.WebAPI.Startup))] 8 | 9 | namespace OA.WebAPI 10 | { 11 | public partial class Startup 12 | { 13 | public void Configuration(IAppBuilder app) 14 | { 15 | ConfigureAuth(app); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |

ASP.NET

3 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS, and JavaScript.

4 |

Learn more »

5 |
6 |
7 |
8 |

Getting started

9 |

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach 10 | a broad range of clients, including browsers and mobile devices. ASP.NET Web API 11 | is an ideal platform for building RESTful applications on the .NET Framework.

12 |

Learn more »

13 |
14 |
15 |

Get more libraries

16 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

17 |

Learn more »

18 |
19 |
20 |

Web Hosting

21 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

22 |

Learn more »

23 |
24 |
25 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Error 6 | 7 | 8 |
9 |

Error.

10 |

An error occurred while processing your request.

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 29 |
30 | @RenderBody() 31 |
32 |
33 |

© @DateTime.Now.Year - My ASP.NET Application

34 |
35 |
36 | 37 | @Scripts.Render("~/bundles/jquery") 38 | @Scripts.Render("~/bundles/bootstrap") 39 | @RenderSection("scripts", required: false) 40 | 41 | 42 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.CodeDom.Providers.DotNetCompilerPlatform 5 | 6 | 7 | 8 | 9 | Provides access to instances of the .NET Compiler Platform C# code generator and code compiler. 10 | 11 | 12 | 13 | 14 | Default Constructor 15 | 16 | 17 | 18 | 19 | Gets an instance of the .NET Compiler Platform C# code compiler. 20 | 21 | An instance of the .NET Compiler Platform C# code compiler 22 | 23 | 24 | 25 | Provides access to instances of the .NET Compiler Platform VB code generator and code compiler. 26 | 27 | 28 | 29 | 30 | Default Constructor 31 | 32 | 33 | 34 | 35 | Gets an instance of the .NET Compiler Platform VB code compiler. 36 | 37 | An instance of the .NET Compiler Platform VB code compiler 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/bin/roslyn/VBCSCompiler.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/favicon.ico -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /OnionArchitecture/OA.WebAPI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/OA.WebAPI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /OnionArchitecture/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/EntityFramework.6.1.3/content/App.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/EntityFramework.6.1.3/content/Web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /OnionArchitecture/packages/EntityFramework.6.1.3/tools/about_EntityFramework.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_EntityFramework 3 | 4 | SHORT DESCRIPTION 5 | Provides information about Entity Framework commands. 6 | 7 | LONG DESCRIPTION 8 | This topic describes the Entity Framework commands. Entity Framework is 9 | Microsoft's recommended data access technology for new applications. 10 | 11 | The following Entity Framework cmdlets are used with Entity Framework 12 | Migrations. 13 | 14 | Cmdlet Description 15 | ----------------- --------------------------------------------------- 16 | Enable-Migrations Enables Code First Migrations in a project. 17 | 18 | Add-Migration Scaffolds a migration script for any pending model 19 | changes. 20 | 21 | Update-Database Applies any pending migrations to the database. 22 | 23 | Get-Migrations Displays the migrations that have been applied to 24 | the target database. 25 | 26 | The following Entity Framework cmdlets are used by NuGet packages that 27 | install Entity Framework providers. These commands are not usually used as 28 | part of normal application development. 29 | 30 | Cmdlet Description 31 | ------------------------------ --------------------------------------- 32 | Add-EFProvider Adds or updates an Entity Framework 33 | provider entry in the project config 34 | file. 35 | 36 | Add-EFDefaultConnectionFactory Adds or updates an Entity Framework 37 | default connection factory in the 38 | project config file. 39 | 40 | Initialize-EFConfiguration Initializes the Entity Framework 41 | section in the project config file and 42 | sets defaults. 43 | 44 | SEE ALSO 45 | Enable-Migrations 46 | Add-Migration 47 | Update-Database 48 | Get-Migrations 49 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.2.2.0/Microsoft.ApplicationInsights.2.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.2.2.0/Microsoft.ApplicationInsights.2.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Agent.Intercept.2.0.6/Microsoft.ApplicationInsights.Agent.Intercept.2.0.6.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.Agent.Intercept.2.0.6/Microsoft.ApplicationInsights.Agent.Intercept.2.0.6.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.DependencyCollector.2.2.0/Microsoft.ApplicationInsights.DependencyCollector.2.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.DependencyCollector.2.2.0/Microsoft.ApplicationInsights.DependencyCollector.2.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.DependencyCollector.2.2.0/content/ApplicationInsights.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.DependencyCollector.2.2.0/content/ApplicationInsights.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.DependencyCollector.2.2.0/content/ApplicationInsights.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0/Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0/Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0/content/ApplicationInsights.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0/content/ApplicationInsights.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/Microsoft.ApplicationInsights.Web.2.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/Microsoft.ApplicationInsights.Web.2.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/content/net40/ApplicationInsights.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/content/net40/ApplicationInsights.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/content/net40/web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/content/net45/ApplicationInsights.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/content/net45/ApplicationInsights.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.Web.2.2.0/content/net45/web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Microsoft.ApplicationInsights.WindowsServer.2.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/Microsoft.ApplicationInsights.WindowsServer.2.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/content/ApplicationInsights.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/content/ApplicationInsights.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.2.2.0/content/ApplicationInsights.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0/content/ApplicationInsights.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 16 | 5 17 | 18 | 19 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0/content/ApplicationInsights.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0/content/ApplicationInsights.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Mvc.5.2.3/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Mvc.5.2.3/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Mvc.5.2.3/Microsoft.AspNet.Mvc.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.Mvc.5.2.3/Microsoft.AspNet.Mvc.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Razor.3.2.3/Microsoft.AspNet.Razor.3.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.Razor.3.2.3/Microsoft.AspNet.Razor.3.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.5.2.3/Microsoft.AspNet.WebApi.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebApi.5.2.3/Microsoft.AspNet.WebApi.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Content/web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ApiDescriptionExtensions.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage 7 | { 8 | public static class ApiDescriptionExtensions 9 | { 10 | /// 11 | /// Generates an URI-friendly ID for the . E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}" 12 | /// 13 | /// The . 14 | /// The ID as a string. 15 | public static string GetFriendlyId(this ApiDescription description) 16 | { 17 | string path = description.RelativePath; 18 | string[] urlParts = path.Split('?'); 19 | string localPath = urlParts[0]; 20 | string queryKeyString = null; 21 | if (urlParts.Length > 1) 22 | { 23 | string query = urlParts[1]; 24 | string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys; 25 | queryKeyString = String.Join("_", queryKeys); 26 | } 27 | 28 | StringBuilder friendlyPath = new StringBuilder(); 29 | friendlyPath.AppendFormat("{0}-{1}", 30 | description.HttpMethod.Method, 31 | localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty)); 32 | if (queryKeyString != null) 33 | { 34 | friendlyPath.AppendFormat("_{0}", queryKeyString.Replace('.', '-')); 35 | } 36 | return friendlyPath.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Controllers/HelpController.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using $rootnamespace$.Areas.HelpPage.ModelDescriptions; 5 | using $rootnamespace$.Areas.HelpPage.Models; 6 | 7 | namespace $rootnamespace$.Areas.HelpPage.Controllers 8 | { 9 | /// 10 | /// The controller that will handle requests for the help page. 11 | /// 12 | public class HelpController : Controller 13 | { 14 | private const string ErrorViewName = "Error"; 15 | 16 | public HelpController() 17 | : this(GlobalConfiguration.Configuration) 18 | { 19 | } 20 | 21 | public HelpController(HttpConfiguration config) 22 | { 23 | Configuration = config; 24 | } 25 | 26 | public HttpConfiguration Configuration { get; private set; } 27 | 28 | public ActionResult Index() 29 | { 30 | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); 31 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 32 | } 33 | 34 | public ActionResult Api(string apiId) 35 | { 36 | if (!String.IsNullOrEmpty(apiId)) 37 | { 38 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 39 | if (apiModel != null) 40 | { 41 | return View(apiModel); 42 | } 43 | } 44 | 45 | return View(ErrorViewName); 46 | } 47 | 48 | public ActionResult ResourceModel(string modelName) 49 | { 50 | if (!String.IsNullOrEmpty(modelName)) 51 | { 52 | ModelDescriptionGenerator modelDescriptionGenerator = Configuration.GetModelDescriptionGenerator(); 53 | ModelDescription modelDescription; 54 | if (modelDescriptionGenerator.GeneratedModels.TryGetValue(modelName, out modelDescription)) 55 | { 56 | return View(modelDescription); 57 | } 58 | } 59 | 60 | return View(ErrorViewName); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/HelpPageAreaRegistration.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class CollectionModelDescription : ModelDescription 4 | { 5 | public ModelDescription ElementDescription { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ComplexTypeModelDescription : ModelDescription 6 | { 7 | public ComplexTypeModelDescription() 8 | { 9 | Properties = new Collection(); 10 | } 11 | 12 | public Collection Properties { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class EnumTypeModelDescription : ModelDescription 7 | { 8 | public EnumTypeModelDescription() 9 | { 10 | Values = new Collection(); 11 | } 12 | 13 | public Collection Values { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class EnumValueDescription 4 | { 5 | public string Documentation { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public string Value { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | { 6 | public interface IModelDocumentationProvider 7 | { 8 | string GetDocumentation(MemberInfo member); 9 | 10 | string GetDocumentation(Type type); 11 | } 12 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class KeyValuePairModelDescription : ModelDescription 4 | { 5 | public ModelDescription KeyModelDescription { get; set; } 6 | 7 | public ModelDescription ValueModelDescription { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/ModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Describes a type model. 7 | /// 8 | public abstract class ModelDescription 9 | { 10 | public string Documentation { get; set; } 11 | 12 | public Type ModelType { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | /// 6 | /// Use this attribute to change the name of the generated for a type. 7 | /// 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)] 9 | public sealed class ModelNameAttribute : Attribute 10 | { 11 | public ModelNameAttribute(string name) 12 | { 13 | Name = name; 14 | } 15 | 16 | public string Name { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 7 | { 8 | internal static class ModelNameHelper 9 | { 10 | // Modify this to provide custom model name mapping. 11 | public static string GetModelName(Type type) 12 | { 13 | ModelNameAttribute modelNameAttribute = type.GetCustomAttribute(); 14 | if (modelNameAttribute != null && !String.IsNullOrEmpty(modelNameAttribute.Name)) 15 | { 16 | return modelNameAttribute.Name; 17 | } 18 | 19 | string modelName = type.Name; 20 | if (type.IsGenericType) 21 | { 22 | // Format the generic type name to something like: GenericOfAgurment1AndArgument2 23 | Type genericType = type.GetGenericTypeDefinition(); 24 | Type[] genericArguments = type.GetGenericArguments(); 25 | string genericTypeName = genericType.Name; 26 | 27 | // Trim the generic parameter counts from the name 28 | genericTypeName = genericTypeName.Substring(0, genericTypeName.IndexOf('`')); 29 | string[] argumentTypeNames = genericArguments.Select(t => GetModelName(t)).ToArray(); 30 | modelName = String.Format(CultureInfo.InvariantCulture, "{0}Of{1}", genericTypeName, String.Join("And", argumentTypeNames)); 31 | } 32 | 33 | return modelName; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ParameterAnnotation 6 | { 7 | public Attribute AnnotationAttribute { get; set; } 8 | 9 | public string Documentation { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | { 6 | public class ParameterDescription 7 | { 8 | public ParameterDescription() 9 | { 10 | Annotations = new Collection(); 11 | } 12 | 13 | public Collection Annotations { get; private set; } 14 | 15 | public string Documentation { get; set; } 16 | 17 | public string Name { get; set; } 18 | 19 | public ModelDescription TypeDescription { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/SampleGeneration/ImageSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/SampleGeneration/InvalidSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/SampleGeneration/SampleDirection.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/SampleGeneration/TextSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/Api.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using $rootnamespace$.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 | 11 |
12 | 19 |
20 | @Html.DisplayForModel() 21 |
22 |
23 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using $rootnamespace$.Areas.HelpPage 5 | @using $rootnamespace$.Areas.HelpPage.Models 6 | @model IGrouping 7 | 8 | @{ 9 | var controllerDocumentation = ViewBag.DocumentationProvider != null ? 10 | ViewBag.DocumentationProvider.GetDocumentation(Model.Key) : 11 | null; 12 | } 13 | 14 |

@Model.Key.ControllerName

15 | @if (!String.IsNullOrEmpty(controllerDocumentation)) 16 | { 17 |

@controllerDocumentation

18 | } 19 | 20 | 21 | 22 | 23 | 24 | @foreach (var api in Model) 25 | { 26 | 27 | 28 | 38 | 39 | } 40 | 41 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 29 | @if (api.Documentation != null) 30 | { 31 |

@api.Documentation

32 | } 33 | else 34 | { 35 |

No documentation available.

36 | } 37 |
-------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model CollectionModelDescription 3 | @if (Model.ElementDescription is ComplexTypeModelDescription) 4 | { 5 | @Html.DisplayFor(m => m.ElementDescription) 6 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model ComplexTypeModelDescription 3 | @Html.DisplayFor(m => m.Properties, "Parameters") -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model DictionaryModelDescription 3 | Dictionary of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model EnumTypeModelDescription 3 | 4 |

Possible enumeration values:

5 | 6 | 7 | 8 | 9 | 10 | 11 | @foreach (EnumValueDescription value in Model.Values) 12 | { 13 | 14 | 15 | 18 | 21 | 22 | } 23 | 24 |
NameValueDescription
@value.Name 16 |

@value.Value

17 |
19 |

@value.Documentation

20 |
-------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using $rootnamespace$.Areas.HelpPage.Models 4 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 5 | @model HelpPageApiModel 6 | 7 | @{ 8 | ApiDescription description = Model.ApiDescription; 9 | } 10 |

@description.HttpMethod.Method @description.RelativePath

11 |
12 |

@description.Documentation

13 | 14 |

Request Information

15 | 16 |

URI Parameters

17 | @Html.DisplayFor(m => m.UriParameters, "Parameters") 18 | 19 |

Body Parameters

20 | 21 |

@Model.RequestDocumentation

22 | 23 | @if (Model.RequestModelDescription != null) 24 | { 25 | @Html.DisplayFor(m => m.RequestModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.RequestModelDescription }) 26 | if (Model.RequestBodyParameters != null) 27 | { 28 | @Html.DisplayFor(m => m.RequestBodyParameters, "Parameters") 29 | } 30 | } 31 | else 32 | { 33 |

None.

34 | } 35 | 36 | @if (Model.SampleRequests.Count > 0) 37 | { 38 |

Request Formats

39 | @Html.DisplayFor(m => m.SampleRequests, "Samples") 40 | } 41 | 42 |

Response Information

43 | 44 |

Resource Description

45 | 46 |

@description.ResponseDescription.Documentation

47 | 48 | @if (Model.ResourceDescription != null) 49 | { 50 | @Html.DisplayFor(m => m.ResourceDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ResourceDescription }) 51 | if (Model.ResourceProperties != null) 52 | { 53 | @Html.DisplayFor(m => m.ResourceProperties, "Parameters") 54 | } 55 | } 56 | else 57 | { 58 |

None.

59 | } 60 | 61 | @if (Model.SampleResponses.Count > 0) 62 | { 63 |

Response Formats

64 | @Html.DisplayFor(m => m.SampleResponses, "Samples") 65 | } 66 | 67 |
-------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

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

Sample not available.

13 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model KeyValuePairModelDescription 3 | Pair of @Html.DisplayFor(m => Model.KeyModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.KeyModelDescription }) [key] 4 | and @Html.DisplayFor(m => Model.ValueModelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = Model.ValueModelDescription }) [value] -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model Type 3 | @{ 4 | ModelDescription modelDescription = ViewBag.modelDescription; 5 | if (modelDescription is ComplexTypeModelDescription || modelDescription is EnumTypeModelDescription) 6 | { 7 | if (Model == typeof(Object)) 8 | { 9 | @:Object 10 | } 11 | else 12 | { 13 | @Html.ActionLink(modelDescription.Name, "ResourceModel", "Help", new { modelName = modelDescription.Name }, null) 14 | } 15 | } 16 | else if (modelDescription is CollectionModelDescription) 17 | { 18 | var collectionDescription = modelDescription as CollectionModelDescription; 19 | var elementDescription = collectionDescription.ElementDescription; 20 | @:Collection of @Html.DisplayFor(m => elementDescription.ModelType, "ModelDescriptionLink", new { modelDescription = elementDescription }) 21 | } 22 | else 23 | { 24 | @Html.DisplayFor(m => modelDescription) 25 | } 26 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using System.Collections.ObjectModel 3 | @using System.Web.Http.Description 4 | @using System.Threading 5 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 6 | @model IList 7 | 8 | @if (Model.Count > 0) 9 | { 10 | 11 | 12 | 13 | 14 | 15 | @foreach (ParameterDescription parameter in Model) 16 | { 17 | ModelDescription modelDescription = parameter.TypeDescription; 18 | 19 | 20 | 23 | 26 | 39 | 40 | } 41 | 42 |
NameDescriptionTypeAdditional information
@parameter.Name 21 |

@parameter.Documentation

22 |
24 | @Html.DisplayFor(m => modelDescription.ModelType, "ModelDescriptionLink", new { modelDescription = modelDescription }) 25 | 27 | @if (parameter.Annotations.Count > 0) 28 | { 29 | foreach (var annotation in parameter.Annotations) 30 | { 31 |

@annotation.Documentation

32 | } 33 | } 34 | else 35 | { 36 |

None.

37 | } 38 |
43 | } 44 | else 45 | { 46 |

None.

47 | } 48 | 49 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/Index.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using $rootnamespace$.Areas.HelpPage.Models 6 | @model Collection 7 | 8 | @{ 9 | ViewBag.Title = "ASP.NET Web API Help Page"; 10 | 11 | // Group APIs by controller 12 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); 13 | } 14 | 15 | 16 |
17 |
18 |
19 |

@ViewBag.Title

20 |
21 |
22 |
23 |
24 | 32 |
33 | @foreach (var group in apiGroups) 34 | { 35 | @Html.DisplayFor(m => group, "ApiGroup") 36 | } 37 |
38 |
39 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Help/ResourceModel.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 3 | @model ModelDescription 4 | 5 | 6 |
7 | 14 |

@Model.Name

15 |

@Model.Documentation

16 |
17 | @Html.DisplayFor(m => Model) 18 |
19 |
20 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Shared/_Layout.cshtml.pp: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Content/Areas/HelpPage/Views/_ViewStart.cshtml.pp: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages. 3 | Layout = "~/Areas/HelpPage/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Microsoft.AspNet.WebApi.HelpPage.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.3/Microsoft.AspNet.WebApi.HelpPage.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/Microsoft.AspNet.WebApi.Owin.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebApi.Owin.5.2.3/Microsoft.AspNet.WebApi.Owin.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebPages.3.2.3/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebPages.3.2.3/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.AspNet.WebPages.3.2.3/Microsoft.AspNet.WebPages.3.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.AspNet.WebPages.3.2.3/Microsoft.AspNet.WebPages.3.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/build/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | roslyn\%(RecursiveDir)%(Filename)%(Extension) 5 | PreserveNewest 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/content/web.config.install.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/content/web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0/lib/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.CodeDom.Providers.DotNetCompilerPlatform 5 | 6 | 7 | 8 | 9 | Provides access to instances of the .NET Compiler Platform C# code generator and code compiler. 10 | 11 | 12 | 13 | 14 | Default Constructor 15 | 16 | 17 | 18 | 19 | Gets an instance of the .NET Compiler Platform C# code compiler. 20 | 21 | An instance of the .NET Compiler Platform C# code compiler 22 | 23 | 24 | 25 | Provides access to instances of the .NET Compiler Platform VB code generator and code compiler. 26 | 27 | 28 | 29 | 30 | Default Constructor 31 | 32 | 33 | 34 | 35 | Gets an instance of the .NET Compiler Platform VB code compiler. 36 | 37 | An instance of the .NET Compiler Platform VB code compiler 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Net.Compilers.1.0.0/Microsoft.Net.Compilers.1.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Net.Compilers.1.0.0/Microsoft.Net.Compilers.1.0.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Net.Compilers.1.0.0/build/Microsoft.Net.Compilers.props: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 12 | 15 | 18 | 19 | 21 | false 23 | $(MSBuildThisFileDirectory)..\tools\Microsoft.CSharp.Core.targets 24 | $(MSBuildThisFileDirectory)..\tools\Microsoft.VisualBasic.Core.targets 25 | 26 | 27 | 29 | 30 | $(MSBuildThisFileDirectory)..\tools 31 | csc.exe 32 | $(MSBuildThisFileDirectory)..\tools 33 | vbc.exe 34 | 35 | 36 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Net.Compilers.1.0.0/tools/VBCSCompiler.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.3.0.1/Microsoft.Owin.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.3.0.1/Microsoft.Owin.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Host.SystemWeb.3.0.1/Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Host.SystemWeb.3.0.1/Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.3.0.1/Microsoft.Owin.Security.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.3.0.1/Microsoft.Owin.Security.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.Cookies.3.0.1/Microsoft.Owin.Security.Cookies.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.Cookies.3.0.1/Microsoft.Owin.Security.Cookies.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.Facebook.3.0.1/Microsoft.Owin.Security.Facebook.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.Facebook.3.0.1/Microsoft.Owin.Security.Facebook.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.Google.3.0.1/Microsoft.Owin.Security.Google.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.Google.3.0.1/Microsoft.Owin.Security.Google.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.MicrosoftAccount.3.0.1/Microsoft.Owin.Security.MicrosoftAccount.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.MicrosoftAccount.3.0.1/Microsoft.Owin.Security.MicrosoftAccount.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.OAuth.3.0.1/Microsoft.Owin.Security.OAuth.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.OAuth.3.0.1/Microsoft.Owin.Security.OAuth.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Owin.Security.Twitter.3.0.1/Microsoft.Owin.Security.Twitter.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Owin.Security.Twitter.3.0.1/Microsoft.Owin.Security.Twitter.3.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.3/Microsoft.jQuery.Unobtrusive.Validation.3.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.3/Microsoft.jQuery.Unobtrusive.Validation.3.2.3.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Modernizr.2.6.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | if ($scriptsFolderProjectItem -eq $null) { 6 | # No Scripts folder 7 | Write-Host "No Scripts folder found" 8 | exit 9 | } 10 | 11 | # Update the _references.js file 12 | AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx $modernizrFileName -------------------------------------------------------------------------------- /OnionArchitecture/packages/Modernizr.2.6.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Update the _references.js file 6 | Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx -------------------------------------------------------------------------------- /OnionArchitecture/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Owin.1.0/Owin.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Owin.1.0/Owin.1.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Respond.1.2.0/Respond.1.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Respond.1.2.0/Respond.1.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Unity.4.0.1/Unity.4.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Unity.4.0.1/Unity.4.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Unity.4.0.1/lib/win8/Microsoft.Practices.Unity.RegistrationByConvention.pri -------------------------------------------------------------------------------- /OnionArchitecture/packages/Unity.AspNet.WebApi.4.0.1/Unity.AspNet.WebApi.4.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/Unity.AspNet.WebApi.4.0.1/Unity.AspNet.WebApi.4.0.1.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/Unity.AspNet.WebApi.4.0.1/content/App_Start/UnityConfig.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Practices.Unity; 3 | using Microsoft.Practices.Unity.Configuration; 4 | 5 | namespace $rootnamespace$.App_Start 6 | { 7 | /// 8 | /// Specifies the Unity configuration for the main container. 9 | /// 10 | public class UnityConfig 11 | { 12 | #region Unity Container 13 | private static Lazy container = new Lazy(() => 14 | { 15 | var container = new UnityContainer(); 16 | RegisterTypes(container); 17 | return container; 18 | }); 19 | 20 | /// 21 | /// Gets the configured Unity container. 22 | /// 23 | public static IUnityContainer GetConfiguredContainer() 24 | { 25 | return container.Value; 26 | } 27 | #endregion 28 | 29 | /// Registers the type mappings with the Unity container. 30 | /// The unity container to configure. 31 | /// There is no need to register concrete types such as controllers or API controllers (unless you want to 32 | /// change the defaults), as Unity allows resolving a concrete type even if it was not previously registered. 33 | public static void RegisterTypes(IUnityContainer container) 34 | { 35 | // NOTE: To load from web.config uncomment the line below. Make sure to add a Microsoft.Practices.Unity.Configuration to the using statements. 36 | // container.LoadConfiguration(); 37 | 38 | // TODO: Register your types here 39 | // container.RegisterType(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/Unity.AspNet.WebApi.4.0.1/content/App_Start/UnityWebApiActivator.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using Microsoft.Practices.Unity.WebApi; 3 | 4 | [assembly: WebActivatorEx.PreApplicationStartMethod(typeof($rootnamespace$.App_Start.UnityWebApiActivator), "Start")] 5 | [assembly: WebActivatorEx.ApplicationShutdownMethod(typeof($rootnamespace$.App_Start.UnityWebApiActivator), "Shutdown")] 6 | 7 | namespace $rootnamespace$.App_Start 8 | { 9 | /// Provides the bootstrapping for integrating Unity with WebApi when it is hosted in ASP.NET 10 | public static class UnityWebApiActivator 11 | { 12 | /// Integrates Unity when the application starts. 13 | public static void Start() 14 | { 15 | // Use UnityHierarchicalDependencyResolver if you want to use a new child container for each IHttpController resolution. 16 | // var resolver = new UnityHierarchicalDependencyResolver(UnityConfig.GetConfiguredContainer()); 17 | var resolver = new UnityDependencyResolver(UnityConfig.GetConfiguredContainer()); 18 | 19 | GlobalConfiguration.Configuration.DependencyResolver = resolver; 20 | } 21 | 22 | /// Disposes the Unity container when the application is shut down. 23 | public static void Shutdown() 24 | { 25 | var container = UnityConfig.GetConfiguredContainer(); 26 | container.Dispose(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /OnionArchitecture/packages/WebActivatorEx.2.0/WebActivatorEx.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/WebActivatorEx.2.0/WebActivatorEx.2.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /OnionArchitecture/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /OnionArchitecture/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /OnionArchitecture/packages/jQuery.1.10.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /OnionArchitecture/packages/jQuery.1.10.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /OnionArchitecture/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /OnionArchitecture/packages/jQuery.Validation.1.11.1/jQuery.Validation.1.11.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmingexperience/OnionArchitecture/a7686fb59a24a1b274d45bdf23b79b62ba35c594/OnionArchitecture/packages/jQuery.Validation.1.11.1/jQuery.Validation.1.11.1.nupkg --------------------------------------------------------------------------------