├── .gitattributes ├── .gitignore ├── Class1.cs ├── FBC.Northwind.Business ├── Class1.cs ├── FBC.Northwind.Business.csproj └── Properties │ └── AssemblyInfo.cs ├── FBC.Northwind.BusinessInterfaces ├── Class1.cs ├── FBC.Northwind.BusinessInterfaces.csproj └── Properties │ └── AssemblyInfo.cs ├── FBC.Northwind.Common ├── Class1.cs ├── FBC.Northwind.Common.csproj └── Properties │ └── AssemblyInfo.cs ├── FBC.Northwind.Data ├── App.config ├── Context │ ├── IDbContextFactory.cs │ └── MusicStoreDbContext.cs ├── EntityConfig │ └── DBInitialiser.cs ├── FBC.Northwind.Data.csproj ├── Properties │ └── AssemblyInfo.cs ├── Repositories │ ├── RepositorieBase.cs │ └── Repositories.cs ├── UnitOfWOrk │ └── UnitOfWork.cs └── packages.config ├── FBC.Northwind.DependencyResolverWeb ├── App.config ├── FBC.Northwind.DependencyResolverWeb.csproj ├── Properties │ └── AssemblyInfo.cs ├── WebAppRegistry.cs └── packages.config ├── FBC.Northwind.Domain ├── Album.cs ├── Artist.cs ├── Data │ ├── AlbumObjectMother.cs │ ├── ArtistObjectMother.cs │ └── GenreObjectMother.cs ├── FBC.Northwind.Domain.csproj ├── Genre.cs └── Properties │ └── AssemblyInfo.cs ├── FBC.Northwind.RepositoryInterfaces ├── FBC.Northwind.RepositoryInterfaces.csproj ├── IAlbumRepository.cs ├── IArtistRepository.cs ├── IGenreRepository.cs ├── IRepository.cs ├── IUnitOfWork.cs └── Properties │ └── AssemblyInfo.cs ├── FBC.Northwind.WebUI.Tests ├── App.config ├── Controllers │ ├── HomeControllerTest.cs │ └── ValuesControllerTest.cs ├── FBC.Northwind.WebUI.Tests.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── FBC.Northwind.WebUI ├── App_Data │ ├── MvcMusicStore13.mdf │ └── MvcMusicStore13_log.ldf ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── IdentityConfig.cs │ ├── RouteConfig.cs │ ├── Startup.Auth.cs │ ├── StructuremapMvc.cs │ ├── StructuremapWebApi.cs │ └── WebApiConfig.cs ├── 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 │ ├── GenreController.cs │ ├── HomeController.cs │ └── ValuesController.cs ├── DependencyResolution │ ├── DefaultRegistry.cs │ ├── IoC.cs │ ├── StructureMapDependencyScope.cs │ ├── StructureMapScopeModule.cs │ ├── StructureMapWebApiDependencyResolver.cs │ └── StructureMapWebApiDependencyScope.cs ├── FBC.Northwind.WebUI.csproj ├── Global.asax ├── Global.asax.cs ├── Models │ ├── AccountBindingModels.cs │ ├── AccountViewModels.cs │ └── IdentityModels.cs ├── Project_Readme.html ├── Properties │ └── AssemblyInfo.cs ├── Providers │ └── ApplicationOAuthProvider.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 ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── packages.config ├── FBC.Northwind.sln └── packages ├── Antlr.3.4.1.9004 ├── Antlr.3.4.1.9004.nupkg └── lib │ └── Antlr3.Runtime.dll ├── CommonServiceLocator.1.3 ├── CommonServiceLocator.1.3.nupkg └── lib │ └── portable-net4+sl5+netcore45+wpa81+wp8 │ ├── Microsoft.Practices.ServiceLocation.XML │ └── Microsoft.Practices.ServiceLocation.dll ├── EntityFramework.6.1.1 ├── EntityFramework.6.1.1.nupkg ├── content │ ├── App.config.transform │ └── Web.config.transform ├── lib │ ├── net40 │ │ ├── EntityFramework.SqlServer.dll │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.dll │ │ └── EntityFramework.xml │ └── net45 │ │ ├── EntityFramework.SqlServer.dll │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.dll │ │ └── EntityFramework.xml └── tools │ ├── EntityFramework.PowerShell.Utility.dll │ ├── EntityFramework.PowerShell.dll │ ├── EntityFramework.psd1 │ ├── EntityFramework.psm1 │ ├── about_EntityFramework.help.txt │ ├── init.ps1 │ ├── install.ps1 │ └── migrate.exe ├── Microsoft.AspNet.Identity.Core.2.1.0 ├── Microsoft.AspNet.Identity.Core.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.Core.dll │ └── Microsoft.AspNet.Identity.Core.xml ├── Microsoft.AspNet.Identity.EntityFramework.2.1.0 ├── Microsoft.AspNet.Identity.EntityFramework.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.EntityFramework.dll │ └── Microsoft.AspNet.Identity.EntityFramework.xml ├── Microsoft.AspNet.Identity.Owin.2.1.0 ├── Microsoft.AspNet.Identity.Owin.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.Owin.dll │ └── Microsoft.AspNet.Identity.Owin.xml ├── Microsoft.AspNet.Mvc.5.2.0 ├── Content │ ├── Web.config.install.xdt │ └── Web.config.uninstall.xdt ├── Microsoft.AspNet.Mvc.5.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Mvc.dll │ └── System.Web.Mvc.xml ├── Microsoft.AspNet.Razor.3.2.0 ├── Microsoft.AspNet.Razor.3.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Razor.dll │ └── System.Web.Razor.xml ├── Microsoft.AspNet.Web.Optimization.1.1.3 ├── Microsoft.AspNet.Web.Optimization.1.1.3.nupkg └── lib │ └── net40 │ ├── System.Web.Optimization.dll │ └── system.web.optimization.xml ├── Microsoft.AspNet.WebApi.5.2.0 └── Microsoft.AspNet.WebApi.5.2.0.nupkg ├── Microsoft.AspNet.WebApi.Client.5.2.0 ├── Microsoft.AspNet.WebApi.Client.5.2.0.nupkg └── lib │ ├── net45 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml │ ├── portable-wp8%2Bnetcore45%2Bnet45%2Bwp81%2Bwpa81 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml │ └── portable-wp8+netcore45+net45+wp81+wpa81 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml ├── Microsoft.AspNet.WebApi.Core.5.2.0 ├── Content │ └── web.config.transform ├── Microsoft.AspNet.WebApi.Core.5.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Http.dll │ └── System.Web.Http.xml ├── Microsoft.AspNet.WebApi.HelpPage.5.2.0 ├── 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.0.nupkg ├── Microsoft.AspNet.WebApi.Owin.5.2.0 ├── Microsoft.AspNet.WebApi.Owin.5.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Http.Owin.dll │ └── System.Web.Http.Owin.xml ├── Microsoft.AspNet.WebApi.WebHost.5.2.0 ├── Microsoft.AspNet.WebApi.WebHost.5.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Http.WebHost.dll │ └── System.Web.Http.WebHost.xml ├── Microsoft.AspNet.WebPages.3.2.0 ├── Content │ ├── Web.config.install.xdt │ └── Web.config.uninstall.xdt ├── Microsoft.AspNet.WebPages.3.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.xml │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.xml │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.xml │ ├── System.Web.WebPages.dll │ └── System.Web.WebPages.xml ├── Microsoft.Owin.2.1.0 ├── Microsoft.Owin.2.1.0.nupkg └── lib │ ├── net40 │ ├── Microsoft.Owin.XML │ └── Microsoft.Owin.dll │ └── net45 │ ├── Microsoft.Owin.XML │ └── Microsoft.Owin.dll ├── Microsoft.Owin.Host.SystemWeb.2.1.0 ├── Microsoft.Owin.Host.SystemWeb.2.1.0.nupkg └── lib │ ├── net40 │ ├── Microsoft.Owin.Host.SystemWeb.dll │ └── Microsoft.Owin.Host.SystemWeb.xml │ └── net45 │ ├── Microsoft.Owin.Host.SystemWeb.dll │ └── Microsoft.Owin.Host.SystemWeb.xml ├── Microsoft.Owin.Security.2.1.0 ├── Microsoft.Owin.Security.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.XML │ └── Microsoft.Owin.Security.dll ├── Microsoft.Owin.Security.Cookies.2.1.0 ├── Microsoft.Owin.Security.Cookies.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.Cookies.dll │ └── Microsoft.Owin.Security.Cookies.xml ├── Microsoft.Owin.Security.Facebook.2.1.0 ├── Microsoft.Owin.Security.Facebook.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.Facebook.XML │ └── Microsoft.Owin.Security.Facebook.dll ├── Microsoft.Owin.Security.Google.2.1.0 ├── Microsoft.Owin.Security.Google.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.Google.XML │ └── Microsoft.Owin.Security.Google.dll ├── Microsoft.Owin.Security.MicrosoftAccount.2.1.0 ├── Microsoft.Owin.Security.MicrosoftAccount.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.MicrosoftAccount.XML │ └── Microsoft.Owin.Security.MicrosoftAccount.dll ├── Microsoft.Owin.Security.OAuth.2.1.0 ├── Microsoft.Owin.Security.OAuth.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.OAuth.XML │ └── Microsoft.Owin.Security.OAuth.dll ├── Microsoft.Owin.Security.Twitter.2.1.0 ├── Microsoft.Owin.Security.Twitter.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.Twitter.XML │ └── Microsoft.Owin.Security.Twitter.dll ├── Microsoft.Web.Infrastructure.1.0.0.0 ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg └── lib │ └── net40 │ └── Microsoft.Web.Infrastructure.dll ├── Microsoft.jQuery.Unobtrusive.Validation.3.2.0 ├── Content │ └── Scripts │ │ ├── jquery.validate.unobtrusive.js │ │ └── jquery.validate.unobtrusive.min.js └── Microsoft.jQuery.Unobtrusive.Validation.3.2.0.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.3 ├── Newtonsoft.Json.6.0.3.nupkg ├── lib │ ├── net20 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net35 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net40 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── netcore45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── portable-net40%2Bsl4%2Bwp7%2Bwin8 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── portable-net40+sl4+wp7+win8 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── portable-net45%2Bwp80%2Bwin8%2Bwpa81 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ └── portable-net45+wp80+win8+wpa81 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml └── tools │ └── install.ps1 ├── Owin.1.0 ├── Owin.1.0.nupkg └── lib │ └── net40 │ └── Owin.dll ├── Respond.1.2.0 ├── Respond.1.2.0.nupkg └── content │ └── Scripts │ ├── respond.js │ └── respond.min.js ├── StructureMap.MVC5.3.0.4.125 ├── StructureMap.MVC5.3.0.4.125.nupkg └── content │ ├── App_Start │ └── StructuremapMvc.cs.pp │ └── DependencyResolution │ ├── DefaultRegistry.cs.pp │ ├── IoC.cs.pp │ ├── StructureMapDependencyScope.cs.pp │ └── StructureMapScopeModule.cs.pp ├── StructureMap.WebApi2.3.0.4.125 ├── StructureMap.WebApi2.3.0.4.125.nupkg └── content │ ├── App_Start │ └── StructuremapWebApi.cs.pp │ └── DependencyResolution │ ├── StructureMapWebApiDependencyResolver.cs.pp │ └── StructureMapWebApiDependencyScope.cs.pp ├── WebActivatorEx.2.0.5 ├── WebActivatorEx.2.0.5.nupkg └── lib │ └── net40 │ └── WebActivatorEx.dll ├── WebGrease.1.5.2 ├── WebGrease.1.5.2.nupkg ├── lib │ └── WebGrease.dll └── tools │ └── WG.exe ├── 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 ├── repositories.config ├── structuremap.3.0.0.108 ├── lib │ └── net40 │ │ ├── StructureMap.Net4.dll │ │ └── StructureMap.dll └── structuremap.3.0.0.108.nupkg └── structuremap.web.3.0.0.108 ├── lib └── net40 │ └── StructureMap.Web.dll └── structuremap.web.3.0.0.108.nupkg /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class Class1 4 | { 5 | public Class1() 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /FBC.Northwind.Business/Class1.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 FBC.Northwind.Business 8 | { 9 | public class Class1 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /FBC.Northwind.Business/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("FBC.Northwind.Business")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.Business")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("e325bdad-2c52-4a2e-bbfb-1c42ab7ace4f")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.BusinessInterfaces/Class1.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 FBC.Northwind.BusinessInterfaces 8 | { 9 | public class Class1 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /FBC.Northwind.BusinessInterfaces/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("FBC.Northwind.BusinessInterfaces")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.BusinessInterfaces")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("c7ef208d-0870-4d49-a025-2e51711a985d")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.Common/Class1.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 FBC.Northwind.Common 8 | { 9 | public class Class1 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /FBC.Northwind.Common/FBC.Northwind.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E68DE5AB-C866-4F42-9786-23A560E08E58} 8 | Library 9 | Properties 10 | FBC.Northwind.Common 11 | FBC.Northwind.Common 12 | v4.5 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 53 | -------------------------------------------------------------------------------- /FBC.Northwind.Common/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("FBC.Northwind.Common")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.Common")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("6999f3a9-5760-4fa0-98f1-3e290ffea283")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.Data/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /FBC.Northwind.Data/Context/IDbContextFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Data.EntityConfig.Northwind.MusicStore.Data.EntityConfig; 7 | 8 | namespace FBC.Northwind.Data.Context 9 | { 10 | public interface IDbContextFactory 11 | { 12 | MusicStoreDbContext Get(); 13 | } 14 | 15 | public class MusicStoreDbContextFactory : IDbContextFactory 16 | { 17 | private MusicStoreDbContext _context; 18 | 19 | public MusicStoreDbContext Get() 20 | { 21 | if (_context == null) InitialiseContext(); 22 | 23 | return _context; 24 | } 25 | 26 | private void InitialiseContext() 27 | { 28 | 29 | //When Using SQLDeploy, we want to update the database ourselves. 30 | //System.Data.Entity.Database.SetInitializer(null); 31 | 32 | //To Use CodeFirst and have it create the sample data .. this initialiser will create the database and insert sample data. 33 | System.Data.Entity.Database.SetInitializer(new MusicStoreDbInitializer()); 34 | //once up and running, use the following 35 | //System.Data.Entity.Database.SetInitializer(null); 36 | 37 | //this is a sample of an alternative method 38 | //System.Data.Entity.Database.SetInitializer(new CreateDatabaseIfNotExists()); 39 | 40 | _context = new MusicStoreDbContext(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /FBC.Northwind.Data/Context/MusicStoreDbContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Data.Entity.ModelConfiguration.Conventions; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using FBC.Northwind.Domain; 9 | 10 | namespace FBC.Northwind.Data.Context 11 | { 12 | public class MusicStoreDbContext : DbContext 13 | { 14 | public IDbSet Albums { get; set; } 15 | public IDbSet Artists { get; set; } 16 | public IDbSet Genres { get; set; } 17 | 18 | public MusicStoreDbContext() 19 | : base("name=DefaultConnection") 20 | { 21 | } 22 | 23 | public MusicStoreDbContext(string connectionString) 24 | : base(connectionString) 25 | { 26 | } 27 | 28 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 29 | { 30 | modelBuilder.Conventions.Remove(); 31 | 32 | //modelBuilder.Entity().ToTable("Albums"); 33 | //modelBuilder.Configurations.Add(new AlbumConfiguration()); 34 | 35 | base.OnModelCreating(modelBuilder); 36 | } 37 | 38 | public void Commit() 39 | { 40 | base.SaveChanges(); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /FBC.Northwind.Data/EntityConfig/DBInitialiser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Data.Context; 7 | using FBC.Northwind.Domain; 8 | 9 | namespace FBC.Northwind.Data.EntityConfig 10 | { 11 | using System.Data.Entity; 12 | using System.Data.Entity.ModelConfiguration; 13 | using FBC.Northwind.Data.Context; 14 | using FBC.Northwind.Domain; 15 | using FBC.Northwind.Domain.Data; 16 | 17 | namespace Northwind.MusicStore.Data.EntityConfig 18 | { 19 | /// 20 | /// This is where you can add additional configuration for your database tables. 21 | /// This is preferable to having database configuration leak all over your Domain Entities. 22 | /// 23 | internal class AlbumConfiguration : EntityTypeConfiguration 24 | { 25 | public AlbumConfiguration() 26 | { 27 | ToTable("Albums"); 28 | //HasKey(t => t.AlbumID); 29 | //Property(t => t.DateTimeCreated).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Computed); 30 | //HasRequired(t => t.User).WithMany(t => t.UserDetails).HasForeignKey(d => d.UserId); 31 | } 32 | } 33 | 34 | public class MusicStoreDbInitializer : DropCreateDatabaseIfModelChanges 35 | //CreateDatabaseIfNotExists, DropCreateDatabaseIfModelChanges, AlwaysRecreateDatabase 36 | { 37 | protected override void Seed(MusicStoreDbContext context) 38 | { 39 | var genres = GenreObjectMother.Build(); 40 | 41 | genres.ForEach(genre => context.Genres.Add(genre)); 42 | 43 | var artists = ArtistObjectMother.Build(); 44 | 45 | var albums = AlbumObjectMother.Build(genres, artists); 46 | 47 | albums.ForEach(a => context.Albums.Add(a)); 48 | } 49 | 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /FBC.Northwind.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("FBC.Northwind.Data")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.Data")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("4888e87d-2155-42f4-a546-ca7d8c416418")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.Data/Repositories/RepositorieBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Data.Entity.Infrastructure; 4 | using System.Linq; 5 | using System.Linq.Expressions; 6 | using FBC.Northwind.Data.Context; 7 | using FBC.Northwind.RepositoryInterfaces; 8 | 9 | namespace FBC.Northwind.Data.Repositories 10 | { 11 | public abstract class RepositoryBase : IRepository where T : class 12 | { 13 | private DbContext _context; 14 | private IDbSet _dbSet; 15 | 16 | protected RepositoryBase(IDbContextFactory contextFactory) 17 | { 18 | if (contextFactory == null) 19 | { 20 | throw new ArgumentNullException("contextFactory"); 21 | } 22 | 23 | ContextFactory = contextFactory; 24 | Context.Configuration.ProxyCreationEnabled = false; 25 | _dbSet = Context.Set(); 26 | } 27 | 28 | protected IDbContextFactory ContextFactory { get; private set; } 29 | 30 | protected DbContext Context 31 | { 32 | get { return _context ?? (_context = ContextFactory.Get()); } 33 | } 34 | 35 | public IQueryable Get(Expression> filter) 36 | { 37 | return _dbSet.Where(filter); 38 | } 39 | 40 | public IQueryable Get() 41 | { 42 | return _dbSet; 43 | } 44 | 45 | public virtual void Add(T entity) 46 | { 47 | _dbSet.Add(entity); 48 | } 49 | 50 | public virtual void Delete(object id) 51 | { 52 | T entityToDelete = _dbSet.Find(id); 53 | Delete(entityToDelete); 54 | } 55 | 56 | public void Delete(T entityToDelete) 57 | { 58 | if (Context.Entry(entityToDelete).State == EntityState.Detached) 59 | { 60 | _dbSet.Attach(entityToDelete); 61 | } 62 | _dbSet.Remove(entityToDelete); 63 | } 64 | 65 | public void Update(T entityToUpdate) 66 | { 67 | _dbSet.Attach(entityToUpdate); 68 | Context.Entry(entityToUpdate).State = EntityState.Modified; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /FBC.Northwind.Data/Repositories/Repositories.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity.Infrastructure; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using FBC.Northwind.Data.Context; 8 | using FBC.Northwind.Domain; 9 | using FBC.Northwind.RepositoryInterfaces; 10 | 11 | namespace FBC.Northwind.Data.Repositories 12 | { 13 | public class ArtistRepository : RepositoryBase, IArtistRepository 14 | { 15 | public ArtistRepository(IDbContextFactory contextFactory) : base(contextFactory) 16 | { 17 | } 18 | } 19 | 20 | public class GenreRepository : RepositoryBase, IGenreRepository 21 | { 22 | public GenreRepository(IDbContextFactory contextFactory) : base(contextFactory) 23 | { 24 | } 25 | } 26 | 27 | public class AlbumRepository : RepositoryBase, IAlbumRepository 28 | { 29 | public AlbumRepository(IDbContextFactory contextFactory) : base(contextFactory) 30 | { 31 | } 32 | 33 | public IEnumerable GetLatestReleases(int count) 34 | { 35 | List latestReleases = Get() 36 | .OrderByDescending(a => a.CreatedDateTime) 37 | .Take(count) 38 | .ToList(); 39 | return latestReleases; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /FBC.Northwind.Data/UnitOfWOrk/UnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Data.Context; 7 | using FBC.Northwind.RepositoryInterfaces; 8 | 9 | namespace FBC.Northwind.Data.UnitOfWOrk 10 | { 11 | public class MusicStoreUnitOfWork : IUnitOfWork 12 | { 13 | private IDbContextFactory _contextFactory; 14 | private MusicStoreDbContext _context; 15 | 16 | public MusicStoreUnitOfWork(IDbContextFactory contextFactory) 17 | { 18 | if (contextFactory == null) 19 | { 20 | throw new ArgumentNullException("contextFactory"); 21 | } 22 | 23 | _contextFactory = contextFactory; 24 | } 25 | 26 | protected MusicStoreDbContext Context 27 | { 28 | get { return _context ?? (_context = _contextFactory.Get()); } 29 | } 30 | 31 | public void SaveChanges() 32 | { 33 | Context.Commit(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /FBC.Northwind.Data/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FBC.Northwind.DependencyResolverWeb/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /FBC.Northwind.DependencyResolverWeb/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("FBC.Northwind.DependencyResolverWeb")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.DependencyResolverWeb")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("0b9aab62-6176-4b2a-8f7c-26e6620184de")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.DependencyResolverWeb/WebAppRegistry.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Data.Context; 7 | using FBC.Northwind.Data.Repositories; 8 | using FBC.Northwind.Data.UnitOfWOrk; 9 | using FBC.Northwind.RepositoryInterfaces; 10 | using StructureMap.Graph; 11 | using StructureMap.Web; 12 | 13 | namespace FBC.Northwind.DependencyResolverWeb 14 | { 15 | public class WebAppRegistry : StructureMap.Configuration.DSL.Registry 16 | { 17 | public WebAppRegistry() 18 | { 19 | Scan( 20 | scan => 21 | { 22 | scan.TheCallingAssembly(); 23 | scan.WithDefaultConventions(); 24 | }); 25 | 26 | For().HybridHttpOrThreadLocalScoped().Use(); 27 | For().HybridHttpOrThreadLocalScoped().Use(); 28 | For().HybridHttpOrThreadLocalScoped().Use(); 29 | For().HybridHttpOrThreadLocalScoped().Use(); 30 | For().HybridHttpOrThreadLocalScoped().Use(); 31 | 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /FBC.Northwind.DependencyResolverWeb/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FBC.Northwind.Domain/Album.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 FBC.Northwind.Domain 8 | { 9 | public class Album 10 | { 11 | public int Id 12 | { 13 | get; 14 | set; 15 | } 16 | public int GenreId { get; set; } 17 | public int ArtistId { get; set; } 18 | public string Title { get; set; } 19 | public decimal Price { get; set; } 20 | public DateTime CreatedDateTime { get; set; } 21 | public string AlbumArtUrl { get; set; } 22 | public virtual Genre Genre { get; set; } 23 | public virtual Artist Artist { get; set; } 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /FBC.Northwind.Domain/Artist.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace FBC.Northwind.Domain 7 | { 8 | public class Artist 9 | { 10 | public int Id { get; set; } 11 | public string Name { get; set; } 12 | public string ImageUrl { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /FBC.Northwind.Domain/Data/GenreObjectMother.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 FBC.Northwind.Domain.Data 8 | { 9 | public class GenreObjectMother 10 | { 11 | public static List Build() 12 | { 13 | var genres = new List 14 | { 15 | new Genre {Name = "Rock"}, 16 | new Genre {Name = "Jazz"}, 17 | new Genre {Name = "Metal"}, 18 | new Genre {Name = "Alternative"}, 19 | new Genre {Name = "Disco"}, 20 | new Genre {Name = "Blues"}, 21 | new Genre {Name = "Latin"}, 22 | new Genre {Name = "Reggae"}, 23 | new Genre {Name = "Pop"}, 24 | new Genre {Name = "Classical"} 25 | }; 26 | return genres; 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /FBC.Northwind.Domain/Genre.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace FBC.Northwind.Domain 7 | { 8 | public class Genre 9 | { 10 | public int Id { get; set; } 11 | public string Name { get; set; } 12 | public string Description { get; set; } 13 | public List Albums { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FBC.Northwind.Domain/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("FBC.Northwind.Domain")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.Domain")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("5d720cd0-626a-4ba6-ae24-8edaea41abb0")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.RepositoryInterfaces/IAlbumRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Domain; 7 | 8 | namespace FBC.Northwind.RepositoryInterfaces 9 | { 10 | public interface IAlbumRepository : IRepository 11 | { 12 | IEnumerable GetLatestReleases(int count); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /FBC.Northwind.RepositoryInterfaces/IArtistRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Domain; 7 | 8 | namespace FBC.Northwind.RepositoryInterfaces 9 | { 10 | public interface IArtistRepository : IRepository 11 | { 12 | } 13 | } -------------------------------------------------------------------------------- /FBC.Northwind.RepositoryInterfaces/IGenreRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using FBC.Northwind.Domain; 7 | 8 | namespace FBC.Northwind.RepositoryInterfaces 9 | { 10 | public interface IGenreRepository : IRepository 11 | { 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /FBC.Northwind.RepositoryInterfaces/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace FBC.Northwind.RepositoryInterfaces 9 | { 10 | public interface IRepository where TEntity : class 11 | { 12 | 13 | //RETRIEVE METHODS 14 | IQueryable Get(Expression> filter); 15 | IQueryable Get(); 16 | 17 | //MODIFICATION METHODS 18 | void Add(TEntity entity); 19 | void Delete(object id); 20 | void Delete(TEntity entityToDelete); 21 | void Update(TEntity entityToUpdate); 22 | 23 | //SAVE is not implelented in the repository 24 | // because we might want to commit changes to the database from 25 | // multiple repositories, save is called from the EfUnitOfWork 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /FBC.Northwind.RepositoryInterfaces/IUnitOfWork.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 FBC.Northwind.RepositoryInterfaces 8 | { 9 | public interface IUnitOfWork 10 | { 11 | void SaveChanges(); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /FBC.Northwind.RepositoryInterfaces/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("FBC.Northwind.RepositoryInterfaces")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.RepositoryInterfaces")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("0b219b27-d224-48db-b617-1a1559420c0d")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI.Tests/Controllers/HomeControllerTest.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using FBC.Northwind.WebUI; 4 | using FBC.Northwind.WebUI.Controllers; 5 | 6 | namespace FBC.Northwind.WebUI.Tests.Controllers 7 | { 8 | [TestClass] 9 | public class HomeControllerTest 10 | { 11 | [TestMethod] 12 | public void Index() 13 | { 14 | // Arrange 15 | HomeController controller = new HomeController(); 16 | 17 | // Act 18 | ViewResult result = controller.Index() as ViewResult; 19 | 20 | // Assert 21 | Assert.IsNotNull(result); 22 | Assert.AreEqual("Home Page", result.ViewBag.Title); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI.Tests/Controllers/ValuesControllerTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.Http; 5 | using System.Text; 6 | using System.Web.Http; 7 | using Microsoft.VisualStudio.TestTools.UnitTesting; 8 | using FBC.Northwind.WebUI; 9 | using FBC.Northwind.WebUI.Controllers; 10 | 11 | namespace FBC.Northwind.WebUI.Tests.Controllers 12 | { 13 | [TestClass] 14 | public class ValuesControllerTest 15 | { 16 | [TestMethod] 17 | public void Get() 18 | { 19 | // Arrange 20 | ValuesController controller = new ValuesController(); 21 | 22 | // Act 23 | IEnumerable result = controller.Get(); 24 | 25 | // Assert 26 | Assert.IsNotNull(result); 27 | Assert.AreEqual(2, result.Count()); 28 | Assert.AreEqual("value1", result.ElementAt(0)); 29 | Assert.AreEqual("value2", result.ElementAt(1)); 30 | } 31 | 32 | [TestMethod] 33 | public void GetById() 34 | { 35 | // Arrange 36 | ValuesController controller = new ValuesController(); 37 | 38 | // Act 39 | string result = controller.Get(5); 40 | 41 | // Assert 42 | Assert.AreEqual("value", result); 43 | } 44 | 45 | [TestMethod] 46 | public void Post() 47 | { 48 | // Arrange 49 | ValuesController controller = new ValuesController(); 50 | 51 | // Act 52 | controller.Post("value"); 53 | 54 | // Assert 55 | } 56 | 57 | [TestMethod] 58 | public void Put() 59 | { 60 | // Arrange 61 | ValuesController controller = new ValuesController(); 62 | 63 | // Act 64 | controller.Put(5, "value"); 65 | 66 | // Assert 67 | } 68 | 69 | [TestMethod] 70 | public void Delete() 71 | { 72 | // Arrange 73 | ValuesController controller = new ValuesController(); 74 | 75 | // Act 76 | controller.Delete(5); 77 | 78 | // Assert 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI.Tests/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("FBC.Northwind.WebUI.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.WebUI.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("9fcdac65-81e5-4ce4-a8cb-3ad5bea2bc2b")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/App_Data/MvcMusicStore13.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/App_Data/MvcMusicStore13.mdf -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/App_Data/MvcMusicStore13_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/App_Data/MvcMusicStore13_log.ldf -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace FBC.Northwind.WebUI 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 | // Set EnableOptimizations to false for debugging. For more information, 28 | // visit http://go.microsoft.com/fwlink/?LinkId=301862 29 | BundleTable.EnableOptimizations = true; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace FBC.Northwind.WebUI 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.Models; 7 | 8 | namespace FBC.Northwind.WebUI 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/App_Start/StructuremapMvc.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using FBC.Northwind.WebUI.App_Start; 19 | 20 | using WebActivatorEx; 21 | 22 | [assembly: PreApplicationStartMethod(typeof(StructuremapMvc), "Start")] 23 | [assembly: ApplicationShutdownMethod(typeof(StructuremapMvc), "End")] 24 | 25 | namespace FBC.Northwind.WebUI.App_Start { 26 | using System.Web.Mvc; 27 | 28 | using Microsoft.Web.Infrastructure.DynamicModuleHelper; 29 | 30 | using FBC.Northwind.WebUI.DependencyResolution; 31 | 32 | using StructureMap; 33 | 34 | public static class StructuremapMvc { 35 | #region Public Properties 36 | 37 | public static StructureMapDependencyScope StructureMapDependencyScope { get; set; } 38 | 39 | #endregion 40 | 41 | #region Public Methods and Operators 42 | 43 | public static void End() { 44 | StructureMapDependencyScope.Dispose(); 45 | } 46 | 47 | public static void Start() { 48 | IContainer container = IoC.Initialize(); 49 | StructureMapDependencyScope = new StructureMapDependencyScope(container); 50 | DependencyResolver.SetResolver(StructureMapDependencyScope); 51 | DynamicModuleUtility.RegisterModule(typeof(StructureMapScopeModule)); 52 | } 53 | 54 | #endregion 55 | } 56 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/App_Start/StructuremapWebApi.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using System.Web.Http; 19 | using FBC.Northwind.WebUI.DependencyResolution; 20 | 21 | [assembly: WebActivatorEx.PostApplicationStartMethod(typeof(FBC.Northwind.WebUI.App_Start.StructuremapWebApi), "Start")] 22 | 23 | namespace FBC.Northwind.WebUI.App_Start { 24 | public static class StructuremapWebApi { 25 | public static void Start() { 26 | var container = StructuremapMvc.StructureMapDependencyScope.Container; 27 | GlobalConfiguration.Configuration.DependencyResolver = new StructureMapWebApiDependencyResolver(container); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | 9 | namespace FBC.Northwind.WebUI 10 | { 11 | public static class WebApiConfig 12 | { 13 | public static void Register(HttpConfiguration config) 14 | { 15 | // Web API configuration and services 16 | // Configure Web API to use only bearer token authentication. 17 | config.SuppressDefaultHostAuthentication(); 18 | config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType)); 19 | 20 | // Web API routes 21 | config.MapHttpAttributeRoutes(); 22 | 23 | config.Routes.MapHttpRoute( 24 | name: "DefaultApi", 25 | routeTemplate: "api/{controller}/{id}", 26 | defaults: new { id = RouteParameter.Optional } 27 | ); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ApiDescriptionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Controllers/HelpController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions; 5 | using FBC.Northwind.WebUI.Areas.HelpPage.Models; 6 | 7 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/HelpPageAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class CollectionModelDescription : ModelDescription 4 | { 5 | public ModelDescription ElementDescription { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/ComplexTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | 3 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/EnumValueDescription.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 5 | { 6 | public interface IModelDocumentationProvider 7 | { 8 | string GetDocumentation(MemberInfo member); 9 | 10 | string GetDocumentation(Type type); 11 | } 12 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/ModelDescription.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/ModelNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/ModelNameHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/ParameterAnnotation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 4 | { 5 | public class ParameterAnnotation 6 | { 7 | public Attribute AnnotationAttribute { get; set; } 8 | 9 | public string Documentation { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/ParameterDescription.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/SampleGeneration/ImageSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/SampleGeneration/InvalidSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/SampleGeneration/SampleDirection.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/SampleGeneration/TextSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/Api.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.Areas.HelpPage 5 | @using FBC.Northwind.WebUI.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 |
-------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 2 | @model CollectionModelDescription 3 | @if (Model.ElementDescription is ComplexTypeModelDescription) 4 | { 5 | @Html.DisplayFor(m => m.ElementDescription) 6 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 2 | @model ComplexTypeModelDescription 3 | @Html.DisplayFor(m => m.Properties, "Parameters") -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.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] -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.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 |
-------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Description 3 | @using FBC.Northwind.WebUI.Areas.HelpPage.Models 4 | @using FBC.Northwind.WebUI.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 |
-------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.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] -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 |
-------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml: -------------------------------------------------------------------------------- 1 | @using FBC.Northwind.WebUI.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Areas/HelpPage/Views/Help/ResourceModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Controllers/GenreController.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 | using FBC.Northwind.Domain; 8 | using FBC.Northwind.RepositoryInterfaces; 9 | 10 | namespace FBC.Northwind.WebUI.Controllers 11 | { 12 | public class GenreController : ApiController 13 | { 14 | private readonly IGenreRepository _genreRepository; 15 | private readonly IUnitOfWork _unitOfWork; 16 | 17 | public GenreController(IGenreRepository genreRepository, IUnitOfWork unitOfWork) 18 | { 19 | _genreRepository = genreRepository; 20 | _unitOfWork = unitOfWork; 21 | } 22 | 23 | 24 | public List Get() 25 | { 26 | return _genreRepository.Get().ToList(); 27 | } 28 | 29 | [HttpPost] 30 | public void Post(Genre genre) 31 | { 32 | //TODO: validation 33 | _genreRepository.Add(genre); 34 | _unitOfWork.SaveChanges(); 35 | } 36 | 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/DependencyResolution/DefaultRegistry.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | namespace FBC.Northwind.WebUI.DependencyResolution { 19 | using StructureMap.Configuration.DSL; 20 | using StructureMap.Graph; 21 | 22 | public class DefaultRegistry : Registry { 23 | #region Constructors and Destructors 24 | 25 | public DefaultRegistry() { 26 | Scan( 27 | scan => { 28 | scan.TheCallingAssembly(); 29 | scan.WithDefaultConventions(); 30 | }); 31 | //For().Use(); 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/DependencyResolution/IoC.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | 19 | using FBC.Northwind.DependencyResolverWeb; 20 | 21 | namespace FBC.Northwind.WebUI.DependencyResolution 22 | { 23 | using StructureMap; 24 | 25 | public static class IoC 26 | { 27 | public static IContainer Initialize() 28 | { 29 | return new Container(c => 30 | { 31 | c.AddRegistry(); 32 | c.AddRegistry(); 33 | }); 34 | } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/DependencyResolution/StructureMapScopeModule.cs: -------------------------------------------------------------------------------- 1 | namespace FBC.Northwind.WebUI.DependencyResolution { 2 | using System.Web; 3 | 4 | using FBC.Northwind.WebUI.App_Start; 5 | 6 | using StructureMap.Web.Pipeline; 7 | 8 | public class StructureMapScopeModule : IHttpModule { 9 | #region Public Methods and Operators 10 | 11 | public void Dispose() { 12 | } 13 | 14 | public void Init(HttpApplication context) { 15 | context.BeginRequest += (sender, e) => StructuremapMvc.StructureMapDependencyScope.CreateNestedContainer(); 16 | context.EndRequest += (sender, e) => { 17 | HttpContextLifecycle.DisposeAndClearAll(); 18 | StructuremapMvc.StructureMapDependencyScope.DisposeNestedContainer(); 19 | }; 20 | } 21 | 22 | #endregion 23 | } 24 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/DependencyResolution/StructureMapWebApiDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using System.Web.Http.Dependencies; 19 | using StructureMap; 20 | 21 | namespace FBC.Northwind.WebUI.DependencyResolution 22 | { 23 | /// 24 | /// The structure map dependency resolver. 25 | /// 26 | public class StructureMapWebApiDependencyResolver : StructureMapWebApiDependencyScope, IDependencyResolver 27 | { 28 | #region Constructors and Destructors 29 | 30 | /// 31 | /// Initializes a new instance of the class. 32 | /// 33 | /// 34 | /// The container. 35 | /// 36 | public StructureMapWebApiDependencyResolver(IContainer container) 37 | : base(container) 38 | { 39 | } 40 | 41 | #endregion 42 | 43 | #region Public Methods and Operators 44 | 45 | /// 46 | /// The begin scope. 47 | /// 48 | /// 49 | /// The System.Web.Http.Dependencies.IDependencyScope. 50 | /// 51 | public IDependencyScope BeginScope() 52 | { 53 | IContainer child = this.Container.GetNestedContainer(); 54 | return new StructureMapWebApiDependencyResolver(child); 55 | } 56 | 57 | #endregion 58 | } 59 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/DependencyResolution/StructureMapWebApiDependencyScope.cs: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Web.Http.Dependencies; 22 | using Microsoft.Practices.ServiceLocation; 23 | using StructureMap; 24 | 25 | namespace FBC.Northwind.WebUI.DependencyResolution 26 | { 27 | /// 28 | /// The structure map web api dependency scope. 29 | /// 30 | public class StructureMapWebApiDependencyScope : StructureMapDependencyScope, IDependencyScope 31 | { 32 | public StructureMapWebApiDependencyScope(IContainer container) 33 | : base(container) { 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="FBC.Northwind.WebUI.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Models/AccountViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.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 | } -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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("FBC.Northwind.WebUI")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FBC.Northwind.WebUI")] 13 | [assembly: AssemblyCopyright("Copyright © 2014")] 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("2f93fcbf-6d83-4e69-89e9-073e35be8ffe")] 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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 FBC.Northwind.WebUI.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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/Scripts/_references.js -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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(FBC.Northwind.WebUI.Startup))] 8 | 9 | namespace FBC.Northwind.WebUI 10 | { 11 | public partial class Startup 12 | { 13 | public void Configuration(IAppBuilder app) 14 | { 15 | ConfigureAuth(app); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = null; 3 | } 4 | 5 | 6 | 7 | 8 | 9 | Error 10 | 11 | 12 |
13 |

Error.

14 |

An error occurred while processing your request.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/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 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/favicon.ico -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /FBC.Northwind.WebUI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/FBC.Northwind.WebUI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg -------------------------------------------------------------------------------- /packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/CommonServiceLocator.1.3/CommonServiceLocator.1.3.nupkg -------------------------------------------------------------------------------- /packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/CommonServiceLocator.1.3/lib/portable-net4+sl5+netcore45+wpa81+wp8/Microsoft.Practices.ServiceLocation.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/EntityFramework.6.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/EntityFramework.6.1.1.nupkg -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/content/App.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/content/Web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net40/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/lib/net40/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net40/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/lib/net40/EntityFramework.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net45/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/lib/net45/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net45/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/lib/net45/EntityFramework.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.Utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.Utility.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/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 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/migrate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/EntityFramework.6.1.1/tools/migrate.exe -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Core.2.1.0/Microsoft.AspNet.Identity.Core.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Identity.Core.2.1.0/Microsoft.AspNet.Identity.Core.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Core.2.1.0/lib/net45/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Identity.Core.2.1.0/lib/net45/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/Microsoft.AspNet.Identity.EntityFramework.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/Microsoft.AspNet.Identity.EntityFramework.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Owin.2.1.0/Microsoft.AspNet.Identity.Owin.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Identity.Owin.2.1.0/Microsoft.AspNet.Identity.Owin.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Owin.2.1.0/lib/net45/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Identity.Owin.2.1.0/lib/net45/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Web.Optimization.1.1.3/lib/net40/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.Web.Optimization.1.1.3/lib/net40/System.Web.Optimization.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.5.2.0/Microsoft.AspNet.WebApi.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.5.2.0/Microsoft.AspNet.WebApi.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.2.0/Microsoft.AspNet.WebApi.Client.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Client.5.2.0/Microsoft.AspNet.WebApi.Client.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.2.0/lib/net45/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Client.5.2.0/lib/net45/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.2.0/lib/portable-wp8%2Bnetcore45%2Bnet45%2Bwp81%2Bwpa81/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Client.5.2.0/lib/portable-wp8%2Bnetcore45%2Bnet45%2Bwp81%2Bwpa81/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Client.5.2.0/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Client.5.2.0/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Core.5.2.0/Content/web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Core.5.2.0/Microsoft.AspNet.WebApi.Core.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Core.5.2.0/Microsoft.AspNet.WebApi.Core.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Core.5.2.0/lib/net45/System.Web.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Core.5.2.0/lib/net45/System.Web.Http.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Content/Areas/HelpPage/ModelDescriptions/DictionaryModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class DictionaryModelDescription : KeyValuePairModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Content/Areas/HelpPage/ModelDescriptions/SimpleTypeModelDescription.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | { 3 | public class SimpleTypeModelDescription : ModelDescription 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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") -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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] -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Content/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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] -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 |
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Content/Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage.ModelDescriptions 2 | @model SimpleTypeModelDescription 3 | @Model.Documentation -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Content/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/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 | } -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Microsoft.AspNet.WebApi.HelpPage.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.HelpPage.5.2.0/Microsoft.AspNet.WebApi.HelpPage.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Owin.5.2.0/Microsoft.AspNet.WebApi.Owin.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Owin.5.2.0/Microsoft.AspNet.WebApi.Owin.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.Owin.5.2.0/lib/net45/System.Web.Http.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.Owin.5.2.0/lib/net45/System.Web.Http.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.WebHost.5.2.0/Microsoft.AspNet.WebApi.WebHost.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.WebHost.5.2.0/Microsoft.AspNet.WebApi.WebHost.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebApi.WebHost.5.2.0/lib/net45/System.Web.Http.WebHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebApi.WebHost.5.2.0/lib/net45/System.Web.Http.WebHost.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/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 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.2.1.0/Microsoft.Owin.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.2.1.0/Microsoft.Owin.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.2.1.0/lib/net40/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.2.1.0/lib/net40/Microsoft.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.2.1.0/lib/net45/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.2.1.0/lib/net45/Microsoft.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.2.1.0/Microsoft.Owin.Host.SystemWeb.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Host.SystemWeb.2.1.0/Microsoft.Owin.Host.SystemWeb.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.2.1.0/lib/net40/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Host.SystemWeb.2.1.0/lib/net40/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.2.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Host.SystemWeb.2.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Facebook.2.1.0/Microsoft.Owin.Security.Facebook.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Facebook.2.1.0/Microsoft.Owin.Security.Facebook.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Facebook.2.1.0/lib/net45/Microsoft.Owin.Security.Facebook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Facebook.2.1.0/lib/net45/Microsoft.Owin.Security.Facebook.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Google.2.1.0/Microsoft.Owin.Security.Google.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Google.2.1.0/Microsoft.Owin.Security.Google.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Google.2.1.0/lib/net45/Microsoft.Owin.Security.Google.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Google.2.1.0/lib/net45/Microsoft.Owin.Security.Google.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.MicrosoftAccount.2.1.0/Microsoft.Owin.Security.MicrosoftAccount.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.MicrosoftAccount.2.1.0/Microsoft.Owin.Security.MicrosoftAccount.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.MicrosoftAccount.2.1.0/lib/net45/Microsoft.Owin.Security.MicrosoftAccount.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.MicrosoftAccount.2.1.0/lib/net45/Microsoft.Owin.Security.MicrosoftAccount.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Twitter.2.1.0/Microsoft.Owin.Security.Twitter.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Twitter.2.1.0/Microsoft.Owin.Security.Twitter.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Twitter.2.1.0/lib/net45/Microsoft.Owin.Security.Twitter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Owin.Security.Twitter.2.1.0/lib/net45/Microsoft.Owin.Security.Twitter.dll -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.0/Microsoft.jQuery.Unobtrusive.Validation.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.0/Microsoft.jQuery.Unobtrusive.Validation.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/Newtonsoft.Json.6.0.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/Newtonsoft.Json.6.0.3.nupkg -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/netcore45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/netcore45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/portable-net40%2Bsl4%2Bwp7%2Bwin8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/portable-net40%2Bsl4%2Bwp7%2Bwin8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/portable-net45%2Bwp80%2Bwin8%2Bwpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/portable-net45%2Bwp80%2Bwin8%2Bwpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.3/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Newtonsoft.Json.6.0.3/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Owin.1.0/Owin.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Owin.1.0/Owin.1.0.nupkg -------------------------------------------------------------------------------- /packages/Owin.1.0/lib/net40/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Owin.1.0/lib/net40/Owin.dll -------------------------------------------------------------------------------- /packages/Respond.1.2.0/Respond.1.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/Respond.1.2.0/Respond.1.2.0.nupkg -------------------------------------------------------------------------------- /packages/StructureMap.MVC5.3.0.4.125/StructureMap.MVC5.3.0.4.125.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/StructureMap.MVC5.3.0.4.125/StructureMap.MVC5.3.0.4.125.nupkg -------------------------------------------------------------------------------- /packages/StructureMap.MVC5.3.0.4.125/content/App_Start/StructuremapMvc.cs.pp: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using $rootnamespace$.App_Start; 19 | 20 | using WebActivatorEx; 21 | 22 | [assembly: PreApplicationStartMethod(typeof(StructuremapMvc), "Start")] 23 | [assembly: ApplicationShutdownMethod(typeof(StructuremapMvc), "End")] 24 | 25 | namespace $rootnamespace$.App_Start { 26 | using System.Web.Mvc; 27 | 28 | using Microsoft.Web.Infrastructure.DynamicModuleHelper; 29 | 30 | using $rootnamespace$.DependencyResolution; 31 | 32 | using StructureMap; 33 | 34 | public static class StructuremapMvc { 35 | #region Public Properties 36 | 37 | public static StructureMapDependencyScope StructureMapDependencyScope { get; set; } 38 | 39 | #endregion 40 | 41 | #region Public Methods and Operators 42 | 43 | public static void End() { 44 | StructureMapDependencyScope.Dispose(); 45 | } 46 | 47 | public static void Start() { 48 | IContainer container = IoC.Initialize(); 49 | StructureMapDependencyScope = new StructureMapDependencyScope(container); 50 | DependencyResolver.SetResolver(StructureMapDependencyScope); 51 | DynamicModuleUtility.RegisterModule(typeof(StructureMapScopeModule)); 52 | } 53 | 54 | #endregion 55 | } 56 | } -------------------------------------------------------------------------------- /packages/StructureMap.MVC5.3.0.4.125/content/DependencyResolution/DefaultRegistry.cs.pp: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | namespace $rootnamespace$.DependencyResolution { 19 | using StructureMap.Configuration.DSL; 20 | using StructureMap.Graph; 21 | 22 | public class DefaultRegistry : Registry { 23 | #region Constructors and Destructors 24 | 25 | public DefaultRegistry() { 26 | Scan( 27 | scan => { 28 | scan.TheCallingAssembly(); 29 | scan.WithDefaultConventions(); 30 | }); 31 | //For().Use(); 32 | } 33 | 34 | #endregion 35 | } 36 | } -------------------------------------------------------------------------------- /packages/StructureMap.MVC5.3.0.4.125/content/DependencyResolution/IoC.cs.pp: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | 19 | namespace $rootnamespace$.DependencyResolution { 20 | using StructureMap; 21 | 22 | public static class IoC { 23 | public static IContainer Initialize() { 24 | return new Container(c => c.AddRegistry()); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /packages/StructureMap.MVC5.3.0.4.125/content/DependencyResolution/StructureMapScopeModule.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.DependencyResolution { 2 | using System.Web; 3 | 4 | using $rootnamespace$.App_Start; 5 | 6 | using StructureMap.Web.Pipeline; 7 | 8 | public class StructureMapScopeModule : IHttpModule { 9 | #region Public Methods and Operators 10 | 11 | public void Dispose() { 12 | } 13 | 14 | public void Init(HttpApplication context) { 15 | context.BeginRequest += (sender, e) => StructuremapMvc.StructureMapDependencyScope.CreateNestedContainer(); 16 | context.EndRequest += (sender, e) => { 17 | HttpContextLifecycle.DisposeAndClearAll(); 18 | StructuremapMvc.StructureMapDependencyScope.DisposeNestedContainer(); 19 | }; 20 | } 21 | 22 | #endregion 23 | } 24 | } -------------------------------------------------------------------------------- /packages/StructureMap.WebApi2.3.0.4.125/StructureMap.WebApi2.3.0.4.125.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/StructureMap.WebApi2.3.0.4.125/StructureMap.WebApi2.3.0.4.125.nupkg -------------------------------------------------------------------------------- /packages/StructureMap.WebApi2.3.0.4.125/content/App_Start/StructuremapWebApi.cs.pp: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using System.Web.Http; 19 | using $rootnamespace$.DependencyResolution; 20 | 21 | [assembly: WebActivatorEx.PostApplicationStartMethod(typeof($rootnamespace$.App_Start.StructuremapWebApi), "Start")] 22 | 23 | namespace $rootnamespace$.App_Start { 24 | public static class StructuremapWebApi { 25 | public static void Start() { 26 | var container = StructuremapMvc.StructureMapDependencyScope.Container; 27 | GlobalConfiguration.Configuration.DependencyResolver = new StructureMapWebApiDependencyResolver(container); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /packages/StructureMap.WebApi2.3.0.4.125/content/DependencyResolution/StructureMapWebApiDependencyResolver.cs.pp: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using System.Web.Http.Dependencies; 19 | using StructureMap; 20 | 21 | namespace $rootnamespace$.DependencyResolution 22 | { 23 | /// 24 | /// The structure map dependency resolver. 25 | /// 26 | public class StructureMapWebApiDependencyResolver : StructureMapWebApiDependencyScope, IDependencyResolver 27 | { 28 | #region Constructors and Destructors 29 | 30 | /// 31 | /// Initializes a new instance of the class. 32 | /// 33 | /// 34 | /// The container. 35 | /// 36 | public StructureMapWebApiDependencyResolver(IContainer container) 37 | : base(container) 38 | { 39 | } 40 | 41 | #endregion 42 | 43 | #region Public Methods and Operators 44 | 45 | /// 46 | /// The begin scope. 47 | /// 48 | /// 49 | /// The System.Web.Http.Dependencies.IDependencyScope. 50 | /// 51 | public IDependencyScope BeginScope() 52 | { 53 | IContainer child = this.Container.GetNestedContainer(); 54 | return new StructureMapWebApiDependencyResolver(child); 55 | } 56 | 57 | #endregion 58 | } 59 | } -------------------------------------------------------------------------------- /packages/StructureMap.WebApi2.3.0.4.125/content/DependencyResolution/StructureMapWebApiDependencyScope.cs.pp: -------------------------------------------------------------------------------- 1 | // -------------------------------------------------------------------------------------------------------------------- 2 | // 3 | // Copyright 2012 Web Advanced (www.webadvanced.com) 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | // -------------------------------------------------------------------------------------------------------------------- 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Web.Http.Dependencies; 22 | using Microsoft.Practices.ServiceLocation; 23 | using StructureMap; 24 | 25 | namespace $rootnamespace$.DependencyResolution 26 | { 27 | /// 28 | /// The structure map web api dependency scope. 29 | /// 30 | public class StructureMapWebApiDependencyScope : StructureMapDependencyScope, IDependencyScope 31 | { 32 | public StructureMapWebApiDependencyScope(IContainer container) 33 | : base(container) { 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/WebActivatorEx.2.0.5/WebActivatorEx.2.0.5.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/WebActivatorEx.2.0.5/WebActivatorEx.2.0.5.nupkg -------------------------------------------------------------------------------- /packages/WebActivatorEx.2.0.5/lib/net40/WebActivatorEx.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/WebActivatorEx.2.0.5/lib/net40/WebActivatorEx.dll -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/lib/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/WebGrease.1.5.2/lib/WebGrease.dll -------------------------------------------------------------------------------- /packages/WebGrease.1.5.2/tools/WG.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/WebGrease.1.5.2/tools/WG.exe -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /packages/jQuery.Validation.1.11.1/jQuery.Validation.1.11.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/jQuery.Validation.1.11.1/jQuery.Validation.1.11.1.nupkg -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/structuremap.3.0.0.108/lib/net40/StructureMap.Net4.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/structuremap.3.0.0.108/lib/net40/StructureMap.Net4.dll -------------------------------------------------------------------------------- /packages/structuremap.3.0.0.108/lib/net40/StructureMap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/structuremap.3.0.0.108/lib/net40/StructureMap.dll -------------------------------------------------------------------------------- /packages/structuremap.3.0.0.108/structuremap.3.0.0.108.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/structuremap.3.0.0.108/structuremap.3.0.0.108.nupkg -------------------------------------------------------------------------------- /packages/structuremap.web.3.0.0.108/lib/net40/StructureMap.Web.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/structuremap.web.3.0.0.108/lib/net40/StructureMap.Web.dll -------------------------------------------------------------------------------- /packages/structuremap.web.3.0.0.108/structuremap.web.3.0.0.108.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duncanhunter/WebAPI2-Onion-Architecture-SSW-Style-with-DI-and-UOW/bc88bf240bc0492b9abeb3bc1262cb6b20caa520/packages/structuremap.web.3.0.0.108/structuremap.web.3.0.0.108.nupkg --------------------------------------------------------------------------------