Browse Source

Standardize namespaces to all be under the `Microsoft.eShopOnWeb` namespace and update default namespaces. (#102)

main
Jeremy Hutchinson 8 years ago
committed by Steve Smith
parent
commit
f953495e38
  1. 1
      src/ApplicationCore/ApplicationCore.csproj
  2. 2
      src/ApplicationCore/Entities/BasketAggregate/Basket.cs
  3. 4
      src/ApplicationCore/Entities/BuyerAggregate/Buyer.cs
  4. 2
      src/ApplicationCore/Entities/BuyerAggregate/PaymentMethod.cs
  5. 2
      src/ApplicationCore/Entities/OrderAggregate/Address.cs
  6. 2
      src/ApplicationCore/Entities/OrderAggregate/CatalogItemOrdered.cs
  7. 4
      src/ApplicationCore/Entities/OrderAggregate/Order.cs
  8. 2
      src/ApplicationCore/Entities/OrderAggregate/OrderItem.cs
  9. 2
      src/ApplicationCore/Exceptions/BasketNotFoundException.cs
  10. 2
      src/ApplicationCore/Exceptions/GuardExtensions.cs
  11. 2
      src/ApplicationCore/Interfaces/IAggregateRoot.cs
  12. 2
      src/ApplicationCore/Interfaces/IAppLogger.cs
  13. 2
      src/ApplicationCore/Interfaces/IAsyncRepository.cs
  14. 2
      src/ApplicationCore/Interfaces/IBasketService.cs
  15. 2
      src/ApplicationCore/Interfaces/IEmailSender.cs
  16. 2
      src/ApplicationCore/Interfaces/IIdentityParser.cs
  17. 4
      src/ApplicationCore/Interfaces/IOrderRepository.cs
  18. 4
      src/ApplicationCore/Interfaces/IOrderService.cs
  19. 2
      src/ApplicationCore/Interfaces/IRepository.cs
  20. 2
      src/ApplicationCore/Interfaces/ISpecification.cs
  21. 2
      src/ApplicationCore/Interfaces/IUriComposer.cs
  22. 6
      src/ApplicationCore/Services/BasketService.cs
  23. 6
      src/ApplicationCore/Services/OrderService.cs
  24. 4
      src/ApplicationCore/Services/UriComposer.cs
  25. 4
      src/ApplicationCore/Specifications/BaseSpecification.cs
  26. 2
      src/ApplicationCore/Specifications/BasketWithItemsSpecification.cs
  27. 2
      src/ApplicationCore/Specifications/CatalogFilterSpecification.cs
  28. 4
      src/ApplicationCore/Specifications/CustomerOrdersWithItemsSpecification.cs
  29. 6
      src/Infrastructure/Data/CatalogContext.cs
  30. 2
      src/Infrastructure/Data/CatalogContextSeed.cs
  31. 4
      src/Infrastructure/Data/EfRepository.cs
  32. 4
      src/Infrastructure/Data/Migrations/20171018175735_Initial.Designer.cs
  33. 2
      src/Infrastructure/Data/Migrations/20171018175735_Initial.cs
  34. 4
      src/Infrastructure/Data/Migrations/CatalogContextModelSnapshot.cs
  35. 6
      src/Infrastructure/Data/OrderRepository.cs
  36. 2
      src/Infrastructure/Identity/AppIdentityDbContext.cs
  37. 2
      src/Infrastructure/Identity/AppIdentityDbContextSeed.cs
  38. 2
      src/Infrastructure/Identity/ApplicationUser.cs
  39. 4
      src/Infrastructure/Identity/Migrations/20170822214310_InitialIdentityModel.Designer.cs
  40. 2
      src/Infrastructure/Identity/Migrations/20170822214310_InitialIdentityModel.cs
  41. 4
      src/Infrastructure/Identity/Migrations/AppIdentityDbContextModelSnapshot.cs
  42. 1
      src/Infrastructure/Infrastructure.csproj
  43. 4
      src/Infrastructure/Logging/LoggerAdapter.cs
  44. 4
      src/Infrastructure/Services/EmailSender.cs
  45. 2
      src/Web/Constants.cs
  46. 9
      src/Web/Controllers/AccountController.cs
  47. 4
      src/Web/Controllers/Api/BaseApiController.cs
  48. 4
      src/Web/Controllers/Api/CatalogController.cs
  49. 12
      src/Web/Controllers/BasketController.cs
  50. 4
      src/Web/Controllers/CatalogController.cs
  51. 10
      src/Web/Controllers/ManageController.cs
  52. 10
      src/Web/Controllers/OrderController.cs
  53. 4
      src/Web/Extensions/EmailSenderExtensions.cs
  54. 2
      src/Web/Extensions/UrlHelperExtensions.cs
  55. 4
      src/Web/Interfaces/IBasketService.cs
  56. 4
      src/Web/Interfaces/ICatalogService.cs
  57. 6
      src/Web/Program.cs
  58. 10
      src/Web/Services/BasketViewModelService.cs
  59. 4
      src/Web/Services/CachedCatalogService.cs
  60. 8
      src/Web/Services/CatalogService.cs
  61. 18
      src/Web/Startup.cs
  62. 8
      src/Web/ViewComponents/Basket.cs
  63. 2
      src/Web/ViewModels/Account/LoginViewModel.cs
  64. 2
      src/Web/ViewModels/Account/LoginWith2faViewModel.cs
  65. 2
      src/Web/ViewModels/Account/RegisterViewModel.cs
  66. 2
      src/Web/ViewModels/Account/ResetPasswordViewModel.cs
  67. 2
      src/Web/ViewModels/BasketComponentViewModel.cs
  68. 2
      src/Web/ViewModels/BasketItemViewModel.cs
  69. 2
      src/Web/ViewModels/BasketViewModel.cs
  70. 2
      src/Web/ViewModels/CatalogIndexViewModel.cs
  71. 2
      src/Web/ViewModels/CatalogItemViewModel.cs
  72. 2
      src/Web/ViewModels/Manage/ChangePasswordViewModel.cs
  73. 2
      src/Web/ViewModels/Manage/EnableAuthenticatorViewModel.cs
  74. 2
      src/Web/ViewModels/Manage/ExternalLoginsViewModel.cs
  75. 2
      src/Web/ViewModels/Manage/GenerateRecoveryCodesViewModel.cs
  76. 2
      src/Web/ViewModels/Manage/IndexViewModel.cs
  77. 2
      src/Web/ViewModels/Manage/RemoveLoginViewModel.cs
  78. 2
      src/Web/ViewModels/Manage/SetPasswordViewModel.cs
  79. 2
      src/Web/ViewModels/Manage/TwoFactorAuthenticationViewModel.cs
  80. 2
      src/Web/ViewModels/OrderItemViewModel.cs
  81. 4
      src/Web/ViewModels/OrderViewModel.cs
  82. 2
      src/Web/ViewModels/PaginationInfoViewModel.cs
  83. 1
      src/Web/Views/Account/LoginWith2fa.cshtml
  84. 85
      src/Web/Views/Account/Register.cshtml
  85. 104
      src/Web/Views/Account/Signin.cshtml
  86. 2
      src/Web/Views/Basket/Checkout.cshtml
  87. 2
      src/Web/Views/Basket/Index.cshtml
  88. 2
      src/Web/Views/Manage/ManageNavPages.cs
  89. 2
      src/Web/Views/Manage/_ViewImports.cshtml
  90. 2
      src/Web/Views/Order/Detail.cshtml
  91. 2
      src/Web/Views/Order/Index.cshtml
  92. 10
      src/Web/Views/_ViewImports.cshtml
  93. 1
      src/Web/Web.csproj
  94. 4
      src/WebRazorPages/Controllers/AccountController.cs
  95. 2
      src/WebRazorPages/Extensions/EmailSenderExtensions.cs
  96. 4
      src/WebRazorPages/Pages/Account/LoginWith2fa.cshtml.cs
  97. 4
      src/WebRazorPages/Pages/Account/LoginWithRecoveryCode.cshtml.cs
  98. 2
      src/WebRazorPages/Pages/Account/Manage/ChangePassword.cshtml.cs
  99. 2
      src/WebRazorPages/Pages/Account/Manage/Disable2fa.cshtml.cs
  100. 2
      src/WebRazorPages/Pages/Account/Manage/EnableAuthenticator.cshtml.cs

1
src/ApplicationCore/ApplicationCore.csproj

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Microsoft.eShopWeb.ApplicationCore</RootNamespace>
</PropertyGroup>
<ItemGroup>

2
src/ApplicationCore/Entities/BasketAggregate/Basket.cs

@ -1,4 +1,4 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Collections.Generic;
using System.Linq;

4
src/ApplicationCore/Entities/BuyerAggregate/Buyer.cs

@ -1,9 +1,9 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Ardalis.GuardClauses;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;
namespace ApplicationCore.Entities.BuyerAggregate
namespace Microsoft.eShopWeb.ApplicationCore.Entities.BuyerAggregate
{
public class Buyer : BaseEntity, IAggregateRoot
{

2
src/ApplicationCore/Entities/BuyerAggregate/PaymentMethod.cs

@ -1,6 +1,6 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
namespace ApplicationCore.Entities.BuyerAggregate
namespace Microsoft.eShopWeb.ApplicationCore.Entities.BuyerAggregate
{
public class PaymentMethod : BaseEntity
{

2
src/ApplicationCore/Entities/OrderAggregate/Address.cs

@ -1,6 +1,6 @@
using System;
namespace ApplicationCore.Entities.OrderAggregate
namespace Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate
{
public class Address // ValueObject
{

2
src/ApplicationCore/Entities/OrderAggregate/CatalogItemOrdered.cs

@ -1,6 +1,6 @@
using Ardalis.GuardClauses;
namespace ApplicationCore.Entities.OrderAggregate
namespace Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate
{
/// <summary>
/// Represents a snapshot of the item that was ordered. If catalog item details change, details of

4
src/ApplicationCore/Entities/OrderAggregate/Order.cs

@ -1,10 +1,10 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Ardalis.GuardClauses;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System;
using System.Collections.Generic;
namespace ApplicationCore.Entities.OrderAggregate
namespace Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate
{
public class Order : BaseEntity, IAggregateRoot
{

2
src/ApplicationCore/Entities/OrderAggregate/OrderItem.cs

@ -1,6 +1,6 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
namespace ApplicationCore.Entities.OrderAggregate
namespace Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate
{
public class OrderItem : BaseEntity

2
src/ApplicationCore/Exceptions/BasketNotFoundException.cs

@ -1,6 +1,6 @@
using System;
namespace ApplicationCore.Exceptions
namespace Microsoft.eShopWeb.ApplicationCore.Exceptions
{
public class BasketNotFoundException : Exception
{

2
src/ApplicationCore/Exceptions/GuardExtensions.cs

@ -1,4 +1,4 @@
using ApplicationCore.Exceptions;
using Microsoft.eShopWeb.ApplicationCore.Exceptions;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
namespace Ardalis.GuardClauses

2
src/ApplicationCore/Interfaces/IAggregateRoot.cs

@ -1,4 +1,4 @@
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IAggregateRoot
{ }

2
src/ApplicationCore/Interfaces/IAppLogger.cs

@ -1,4 +1,4 @@
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
/// <summary>
/// This type eliminates the need to depend directly on the ASP.NET Core logging types.

2
src/ApplicationCore/Interfaces/IAsyncRepository.cs

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IAsyncRepository<T> where T : BaseEntity
{

2
src/ApplicationCore/Interfaces/IBasketService.cs

@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IBasketService
{

2
src/ApplicationCore/Interfaces/IEmailSender.cs

@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IEmailSender

2
src/ApplicationCore/Interfaces/IIdentityParser.cs

@ -1,6 +1,6 @@
using System.Security.Principal;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IIdentityParser<T>
{

4
src/ApplicationCore/Interfaces/IOrderRepository.cs

@ -1,7 +1,7 @@
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using System.Threading.Tasks;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IOrderRepository : IRepository<Order>, IAsyncRepository<Order>

4
src/ApplicationCore/Interfaces/IOrderService.cs

@ -1,7 +1,7 @@
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using System.Threading.Tasks;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IOrderService
{

2
src/ApplicationCore/Interfaces/IRepository.cs

@ -1,7 +1,7 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IRepository<T> where T : BaseEntity
{

2
src/ApplicationCore/Interfaces/ISpecification.cs

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq.Expressions;
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface ISpecification<T>
{

2
src/ApplicationCore/Interfaces/IUriComposer.cs

@ -1,4 +1,4 @@
namespace ApplicationCore.Interfaces
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IUriComposer
{

6
src/ApplicationCore/Services/BasketService.cs

@ -1,13 +1,13 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Threading.Tasks;
using System.Collections.Generic;
using ApplicationCore.Specifications;
using Microsoft.eShopWeb.ApplicationCore.Specifications;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Linq;
using Ardalis.GuardClauses;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
namespace ApplicationCore.Services
namespace Microsoft.eShopWeb.ApplicationCore.Services
{
public class BasketService : IBasketService
{

6
src/ApplicationCore/Services/OrderService.cs

@ -1,12 +1,12 @@
using ApplicationCore.Interfaces;
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using System.Threading.Tasks;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;
using Ardalis.GuardClauses;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
namespace ApplicationCore.Services
namespace Microsoft.eShopWeb.ApplicationCore.Services
{
public class OrderService : IOrderService
{

4
src/ApplicationCore/Services/UriComposer.cs

@ -1,7 +1,7 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb;
namespace ApplicationCore.Services
namespace Microsoft.eShopWeb.ApplicationCore.Services
{
public class UriComposer : IUriComposer
{

4
src/ApplicationCore/Specifications/BaseSpecification.cs

@ -1,9 +1,9 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System;
using System.Linq.Expressions;
using System.Collections.Generic;
namespace ApplicationCore.Specifications
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
{
public abstract class BaseSpecification<T> : ISpecification<T>
{

2
src/ApplicationCore/Specifications/BasketWithItemsSpecification.cs

@ -1,7 +1,7 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
namespace ApplicationCore.Specifications
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
{
public sealed class BasketWithItemsSpecification : BaseSpecification<Basket>
{

2
src/ApplicationCore/Specifications/CatalogFilterSpecification.cs

@ -1,6 +1,6 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
namespace ApplicationCore.Specifications
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
{
public class CatalogFilterSpecification : BaseSpecification<CatalogItem>

4
src/ApplicationCore/Specifications/CustomerOrdersWithItemsSpecification.cs

@ -1,6 +1,6 @@
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
namespace ApplicationCore.Specifications
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
{
public class CustomerOrdersWithItemsSpecification : BaseSpecification<Order>
{

6
src/Infrastructure/Data/CatalogContext.cs

@ -1,10 +1,10 @@
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
namespace Infrastructure.Data
namespace Microsoft.eShopWeb.Infrastructure.Data
{
public class CatalogContext : DbContext

2
src/Infrastructure/Data/CatalogContextSeed.cs

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Infrastructure.Data
namespace Microsoft.eShopWeb.Infrastructure.Data
{
public class CatalogContextSeed
{

4
src/Infrastructure/Data/EfRepository.cs

@ -1,11 +1,11 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Infrastructure.Data
namespace Microsoft.eShopWeb.Infrastructure.Data
{
/// <summary>
/// "There's some repetition here - couldn't we have some the sync methods call the async?"

4
src/Infrastructure/Data/Migrations/20171018175735_Initial.Designer.cs

@ -1,5 +1,5 @@
// <auto-generated />
using Infrastructure.Data;
using Microsoft.eShopWeb.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Internal;
using System;
namespace Infrastructure.Data.Migrations
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
{
[DbContext(typeof(CatalogContext))]
[Migration("20171018175735_Initial")]

2
src/Infrastructure/Data/Migrations/20171018175735_Initial.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace Infrastructure.Data.Migrations
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
{
public partial class Initial : Migration
{

4
src/Infrastructure/Data/Migrations/CatalogContextModelSnapshot.cs

@ -1,5 +1,5 @@
// <auto-generated />
using Infrastructure.Data;
using Microsoft.eShopWeb.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Internal;
using System;
namespace Infrastructure.Data.Migrations
namespace Microsoft.eShopWeb.Infrastructure.Data.Migrations
{
[DbContext(typeof(CatalogContext))]
partial class CatalogContextModelSnapshot : ModelSnapshot

6
src/Infrastructure/Data/OrderRepository.cs

@ -1,10 +1,10 @@
using ApplicationCore.Entities.OrderAggregate;
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Threading.Tasks;
namespace Infrastructure.Data
namespace Microsoft.eShopWeb.Infrastructure.Data
{
public class OrderRepository : EfRepository<Order>, IOrderRepository
{

2
src/Infrastructure/Identity/AppIdentityDbContext.cs

@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore;
namespace Infrastructure.Identity
namespace Microsoft.eShopWeb.Infrastructure.Identity
{
public class AppIdentityDbContext : IdentityDbContext<ApplicationUser>
{

2
src/Infrastructure/Identity/AppIdentityDbContextSeed.cs

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Identity;
using System.Threading.Tasks;
namespace Infrastructure.Identity
namespace Microsoft.eShopWeb.Infrastructure.Identity
{
public class AppIdentityDbContextSeed
{

2
src/Infrastructure/Identity/ApplicationUser.cs

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Identity;
namespace Infrastructure.Identity
namespace Microsoft.eShopWeb.Infrastructure.Identity
{
public class ApplicationUser : IdentityUser
{

4
src/Infrastructure/Identity/Migrations/20170822214310_InitialIdentityModel.Designer.cs

@ -3,9 +3,9 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
namespace Infrastructure.Identity.Migrations
namespace Microsoft.eShopWeb.Infrastructure.Identity.Migrations
{
[DbContext(typeof(AppIdentityDbContext))]
[Migration("20170822214310_InitialIdentityModel")]

2
src/Infrastructure/Identity/Migrations/20170822214310_InitialIdentityModel.cs

@ -3,7 +3,7 @@ using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Metadata;
namespace Infrastructure.Identity.Migrations
namespace Microsoft.eShopWeb.Infrastructure.Identity.Migrations
{
public partial class InitialIdentityModel : Migration
{

4
src/Infrastructure/Identity/Migrations/AppIdentityDbContextModelSnapshot.cs

@ -3,9 +3,9 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
namespace Infrastructure.Identity.Migrations
namespace Microsoft.eShopWeb.Infrastructure.Identity.Migrations
{
[DbContext(typeof(AppIdentityDbContext))]
partial class AppIdentityDbContextModelSnapshot : ModelSnapshot

1
src/Infrastructure/Infrastructure.csproj

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Microsoft.eShopWeb.Infrastructure</RootNamespace>
</PropertyGroup>
<ItemGroup>

4
src/Infrastructure/Logging/LoggerAdapter.cs

@ -1,7 +1,7 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.Extensions.Logging;
namespace Infrastructure.Logging
namespace Microsoft.eShopWeb.Infrastructure.Logging
{
public class LoggerAdapter<T> : IAppLogger<T>
{

4
src/Infrastructure/Services/EmailSender.cs

@ -1,7 +1,7 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Threading.Tasks;
namespace Infrastructure.Services
namespace Microsoft.eShopWeb.Infrastructure.Services
{
// This class is used by the application to send email for account confirmation and password reset.
// For more details see https://go.microsoft.com/fwlink/?LinkID=532713

2
src/Web/Constants.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb
namespace Microsoft.eShopWeb.Web
{
public static class Constants
{

9
src/Web/Controllers/AccountController.cs

@ -1,15 +1,14 @@
using ApplicationCore.Interfaces;
using Infrastructure.Identity;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb.ViewModels.Account;
using Microsoft.eShopWeb.Web.ViewModels.Account;
using System;
using System.Threading.Tasks;
using Web.ViewModels.Account;
namespace Microsoft.eShopWeb.Controllers
namespace Microsoft.eShopWeb.Web.Controllers
{
[Route("[controller]/[action]")]

4
src/Web/Controllers/Api/BaseApiController.cs

@ -1,8 +1,8 @@
using Microsoft.eShopWeb.Services;
using Microsoft.eShopWeb.Web.Services;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Controllers.Api
namespace Microsoft.eShopWeb.Web.Controllers.Api
{
[Route("api/[controller]/[action]")]
public class BaseApiController : Controller

4
src/Web/Controllers/Api/CatalogController.cs

@ -1,8 +1,8 @@
using Microsoft.eShopWeb.Services;
using Microsoft.eShopWeb.Web.Services;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Controllers.Api
namespace Microsoft.eShopWeb.Web.Controllers.Api
{
public class CatalogController : BaseApiController
{

12
src/Web/Controllers/BasketController.cs

@ -1,17 +1,17 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.AspNetCore.Http;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.ViewModels;
using Microsoft.AspNetCore.Identity;
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
using System;
using System.Collections.Generic;
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using Microsoft.AspNetCore.Authorization;
using Microsoft.eShopWeb.Interfaces;
using Microsoft.eShopWeb.Web.Interfaces;
namespace Microsoft.eShopWeb.Controllers
namespace Microsoft.eShopWeb.Web.Controllers
{
[Route("[controller]/[action]")]
public class BasketController : Controller

4
src/Web/Controllers/CatalogController.cs

@ -1,8 +1,8 @@
using Microsoft.eShopWeb.Services;
using Microsoft.eShopWeb.Web.Services;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Controllers
namespace Microsoft.eShopWeb.Web.Controllers
{
[Route("")]
public class CatalogController : Controller

10
src/Web/Controllers/ManageController.cs

@ -1,18 +1,18 @@
using ApplicationCore.Interfaces;
using Infrastructure.Identity;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb.ViewModels.Manage;
using Microsoft.eShopWeb.Services;
using Microsoft.eShopWeb.Web.ViewModels.Manage;
using Microsoft.eShopWeb.Web.Services;
using System;
using System.Linq;
using System.Text;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Controllers
namespace Microsoft.eShopWeb.Web.Controllers
{
[Authorize]
[Route("[controller]/[action]")]

10
src/Web/Controllers/OrderController.cs

@ -1,14 +1,14 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.ViewModels;
using System;
using ApplicationCore.Entities.OrderAggregate;
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Linq;
using ApplicationCore.Specifications;
using Microsoft.eShopWeb.ApplicationCore.Specifications;
namespace Microsoft.eShopWeb.Controllers
namespace Microsoft.eShopWeb.Web.Controllers
{
[Authorize]
[Route("[controller]/[action]")]

4
src/Web/Extensions/EmailSenderExtensions.cs

@ -1,8 +1,8 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Services
namespace Microsoft.eShopWeb.Web.Services
{
public static class EmailSenderExtensions
{

2
src/Web/Extensions/UrlHelperExtensions.cs

@ -1,4 +1,4 @@
using Microsoft.eShopWeb.Controllers;
using Microsoft.eShopWeb.Web.Controllers;
namespace Microsoft.AspNetCore.Mvc
{

4
src/Web/Interfaces/IBasketService.cs

@ -1,7 +1,7 @@
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.ViewModels;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Interfaces
namespace Microsoft.eShopWeb.Web.Interfaces
{
public interface IBasketViewModelService
{

4
src/Web/Interfaces/ICatalogService.cs

@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.ViewModels;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Services
namespace Microsoft.eShopWeb.Web.Services
{
public interface ICatalogService
{

6
src/Web/Program.cs

@ -1,13 +1,13 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore;
using Microsoft.Extensions.DependencyInjection;
using Infrastructure.Data;
using Microsoft.eShopWeb.Infrastructure.Data;
using System;
using Microsoft.Extensions.Logging;
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
namespace Microsoft.eShopWeb
namespace Microsoft.eShopWeb.Web
{
public class Program
{

10
src/Web/Services/BasketViewModelService.cs

@ -1,14 +1,14 @@
using ApplicationCore.Interfaces;
using ApplicationCore.Specifications;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Specifications;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
using Microsoft.eShopWeb.Interfaces;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.Interfaces;
using Microsoft.eShopWeb.Web.ViewModels;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopWeb.Services
namespace Microsoft.eShopWeb.Web.Services
{
public class BasketViewModelService : IBasketViewModelService
{

4
src/Web/Services/CachedCatalogService.cs

@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.ViewModels;
using Microsoft.Extensions.Caching.Memory;
using System;
namespace Microsoft.eShopWeb.Services
namespace Microsoft.eShopWeb.Web.Services
{
public class CachedCatalogService : ICatalogService
{

8
src/Web/Services/CatalogService.cs

@ -2,14 +2,14 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.ViewModels;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using Microsoft.Extensions.Logging;
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System;
using ApplicationCore.Specifications;
using Microsoft.eShopWeb.ApplicationCore.Specifications;
namespace Microsoft.eShopWeb.Services
namespace Microsoft.eShopWeb.Web.Services
{
/// <summary>
/// This is a UI-specific service so belongs in UI project. It does not contain any business logic and works

18
src/Web/Startup.cs

@ -1,22 +1,22 @@
using ApplicationCore.Interfaces;
using ApplicationCore.Services;
using Infrastructure.Data;
using Infrastructure.Identity;
using Infrastructure.Logging;
using Infrastructure.Services;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Services;
using Microsoft.eShopWeb.Infrastructure.Data;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Logging;
using Microsoft.eShopWeb.Infrastructure.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.Interfaces;
using Microsoft.eShopWeb.Services;
using Microsoft.eShopWeb.Web.Interfaces;
using Microsoft.eShopWeb.Web.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Text;
namespace Microsoft.eShopWeb
namespace Microsoft.eShopWeb.Web
{
public class Startup
{

8
src/Web/ViewComponents/Basket.cs

@ -1,14 +1,14 @@
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb;
using Microsoft.eShopWeb.Interfaces;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Web.Interfaces;
using Microsoft.eShopWeb.Web.ViewModels;
using System.Linq;
using System.Threading.Tasks;
namespace Web.ViewComponents
namespace Microsoft.eShopWeb.Web.ViewComponents
{
public class Basket : ViewComponent
{

2
src/Web/ViewModels/Account/LoginViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Account
namespace Microsoft.eShopWeb.Web.ViewModels.Account
{
public class LoginViewModel
{

2
src/Web/ViewModels/Account/LoginWith2faViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Account
namespace Microsoft.eShopWeb.Web.ViewModels.Account
{
public class LoginWith2faViewModel
{

2
src/Web/ViewModels/Account/RegisterViewModel.cs

@ -1,7 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Account
namespace Microsoft.eShopWeb.Web.ViewModels.Account
{
public class RegisterViewModel
{

2
src/Web/ViewModels/Account/ResetPasswordViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Web.ViewModels.Account
namespace Microsoft.eShopWeb.Web.ViewModels.Account
{
public class ResetPasswordViewModel
{

2
src/Web/ViewModels/BasketComponentViewModel.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class BasketComponentViewModel
{

2
src/Web/ViewModels/BasketItemViewModel.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class BasketItemViewModel
{

2
src/Web/ViewModels/BasketViewModel.cs

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class BasketViewModel
{

2
src/Web/ViewModels/CatalogIndexViewModel.cs

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class CatalogIndexViewModel
{

2
src/Web/ViewModels/CatalogItemViewModel.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class CatalogItemViewModel
{

2
src/Web/ViewModels/Manage/ChangePasswordViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class ChangePasswordViewModel
{

2
src/Web/ViewModels/Manage/EnableAuthenticatorViewModel.cs

@ -1,7 +1,7 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class EnableAuthenticatorViewModel
{

2
src/Web/ViewModels/Manage/ExternalLoginsViewModel.cs

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Identity;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class ExternalLoginsViewModel
{

2
src/Web/ViewModels/Manage/GenerateRecoveryCodesViewModel.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class GenerateRecoveryCodesViewModel
{

2
src/Web/ViewModels/Manage/IndexViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class IndexViewModel
{

2
src/Web/ViewModels/Manage/RemoveLoginViewModel.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class RemoveLoginViewModel
{

2
src/Web/ViewModels/Manage/SetPasswordViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class SetPasswordViewModel
{

2
src/Web/ViewModels/Manage/TwoFactorAuthenticationViewModel.cs

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels.Manage
namespace Microsoft.eShopWeb.Web.ViewModels.Manage
{
public class TwoFactorAuthenticationViewModel
{

2
src/Web/ViewModels/OrderItemViewModel.cs

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class OrderItemViewModel
{

4
src/Web/ViewModels/OrderViewModel.cs

@ -1,8 +1,8 @@
using ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using System;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class OrderViewModel
{

2
src/Web/ViewModels/PaginationInfoViewModel.cs

@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.ViewModels
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class PaginationInfoViewModel
{

1
src/Web/Views/Account/LoginWith2fa.cshtml

@ -1,3 +1,4 @@
@using Microsoft.eShopWeb.Web.ViewModels.Account
@model LoginWith2faViewModel
@{
ViewData["Title"] = "Two-factor authentication";

85
src/Web/Views/Account/Register.cshtml

@ -1,55 +1,56 @@
@using System.Collections.Generic
@using Microsoft.AspNetCore.Http
@using Microsoft.AspNetCore.Http.Authentication
@using Microsoft.eShopWeb.Web.ViewModels.Account
@model RegisterViewModel
@{
ViewData["Title"] = "Register";
}
<div class="brand-header-block">
<ul class="container">
<li class="active" style="margin-right: 65px;">Already have an account? <a asp-action="Signin">LOGIN</a></li>
</ul>
</div>
<div class="container account-login-container">
<div class="row">
<div class="col-md-12">
<section>
<form asp-controller="Account" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Email" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Email" class="form-control" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<label asp-for="Password" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Password" class="form-control" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="brand-header-block">
<ul class="container">
<li class="active" style="margin-right: 65px;">Already have an account? <a asp-action="Signin">LOGIN</a></li>
</ul>
</div>
<div class="container account-login-container">
<div class="row">
<div class="col-md-12">
<section>
<form asp-controller="Account" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Email" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Email" class="form-control" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ConfirmPassword" class="form-control" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<label asp-for="Password" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Password" class="form-control" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand btn-brand-big">&nbsp;REGISTER&nbsp;</button>
</div>
<div class="form-group">
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ConfirmPassword" class="form-control" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
</div>
<p>
Note that for demo purposes you don't need to register! Use the credentials shown below the
<a asp-action="signin">login screen</a>.
</p>
</form>
</section>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand btn-brand-big">&nbsp;REGISTER&nbsp;</button>
</div>
<p>
Note that for demo purposes you don't need to register! Use the credentials shown below the
<a asp-action="signin">login screen</a>.
</p>
</form>
</section>
</div>
</div>
</div>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}

104
src/Web/Views/Account/Signin.cshtml

@ -1,60 +1,60 @@
@using Microsoft.eShopWeb.ViewModels.Account
@using Microsoft.eShopWeb.Web.ViewModels.Account
@model LoginViewModel
@{
ViewData["Title"] = "Log in";
}
<div class="brand-header-block">
<ul class="container">
@*<li><a asp-area="" asp-controller="Account" asp-action="Register">REGISTER</a></li>*@
<li class="active" style="margin-right: 65px;">LOGIN</li>
</ul>
</div>
<div class="container account-login-container">
<div class="row">
<div class="col-md-12">
<section>
<form asp-controller="Account" asp-action="SignIn" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<h4>ARE YOU REGISTERED?</h4>
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Email" class="control-label form-label"></label>
<input asp-for="Email" class="form-control form-input form-input-center" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Password" class="control-label form-label"></label>
<input asp-for="Password" class="form-control form-input form-input-center" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group">
<div class="checkbox">
<label asp-for="RememberMe">
<input asp-for="RememberMe" />
@Html.DisplayNameFor(m => m.RememberMe)
</label>
</div>
<div class="brand-header-block">
<ul class="container">
@*<li><a asp-area="" asp-controller="Account" asp-action="Register">REGISTER</a></li>*@
<li class="active" style="margin-right: 65px;">LOGIN</li>
</ul>
</div>
<div class="container account-login-container">
<div class="row">
<div class="col-md-12">
<section>
<form asp-controller="Account" asp-action="SignIn" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<h4>ARE YOU REGISTERED?</h4>
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Email" class="control-label form-label"></label>
<input asp-for="Email" class="form-control form-input form-input-center" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Password" class="control-label form-label"></label>
<input asp-for="Password" class="form-control form-input form-input-center" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group">
<div class="checkbox">
<label asp-for="RememberMe">
<input asp-for="RememberMe" />
@Html.DisplayNameFor(m => m.RememberMe)
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand btn-brand-big">&nbsp;LOG IN&nbsp;</button>
</div>
<p>
<a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" class="text">Register as a new user?</a>
</p>
<p>
Note that for demo purposes you don't need to register and can login with these credentials:
</p>
<p>
User: <b>demouser@microsoft.com</b>
</p>
<p>
Password: <b>Pass@word1</b>
</p>
</form>
</section>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand btn-brand-big">&nbsp;LOG IN&nbsp;</button>
</div>
<p>
<a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" class="text">Register as a new user?</a>
</p>
<p>
Note that for demo purposes you don't need to register and can login with these credentials:
</p>
<p>
User: <b>demouser@microsoft.com</b>
</p>
<p>
Password: <b>Pass@word1</b>
</p>
</form>
</section>
</div>
</div>
</div>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}

2
src/Web/Views/Basket/Checkout.cshtml

@ -1,4 +1,4 @@
@using Microsoft.eShopWeb.ViewModels
@using Microsoft.eShopWeb.Web.ViewModels
@{
ViewData["Title"] = "Checkout Complete";
@model BasketViewModel

2
src/Web/Views/Basket/Index.cshtml

@ -1,4 +1,4 @@
@using Microsoft.eShopWeb.ViewModels
@using Microsoft.eShopWeb.Web.ViewModels
@model BasketViewModel
@{
ViewData["Title"] = "Basket";

2
src/Web/Views/Manage/ManageNavPages.cs

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace Microsoft.eShopWeb.Views.Manage
namespace Microsoft.eShopWeb.Web.Views.Manage
{
public static class ManageNavPages
{

2
src/Web/Views/Manage/_ViewImports.cshtml

@ -1 +1 @@
@using Microsoft.eShopWeb.Views.Manage
@using Microsoft.eShopWeb.Web.Views.Manage

2
src/Web/Views/Order/Detail.cshtml

@ -1,4 +1,4 @@
@using Microsoft.eShopWeb.ViewModels
@using Microsoft.eShopWeb.Web.ViewModels
@model OrderViewModel
@{
ViewData["Title"] = "My Order History";

2
src/Web/Views/Order/Index.cshtml

@ -1,4 +1,4 @@
@using Microsoft.eShopWeb.ViewModels
@using Microsoft.eShopWeb.Web.ViewModels
@model IEnumerable<OrderViewModel>
@{
ViewData["Title"] = "My Order History";

10
src/Web/Views/_ViewImports.cshtml

@ -1,7 +1,7 @@
@using Microsoft.eShopWeb
@using Microsoft.eShopWeb.ViewModels
@using Microsoft.eShopWeb.ViewModels.Account
@using Microsoft.eShopWeb.ViewModels.Manage
@using Microsoft.eShopWeb.Web
@using Microsoft.eShopWeb.Web.ViewModels
@using Microsoft.eShopWeb.Web.ViewModels.Account
@using Microsoft.eShopWeb.Web.ViewModels.Manage
@using Microsoft.AspNetCore.Identity
@using Infrastructure.Identity
@using Microsoft.eShopWeb.Infrastructure.Identity
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

1
src/Web/Web.csproj

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>Microsoft.eShopWeb.Web</RootNamespace>
</PropertyGroup>
<ItemGroup>

4
src/WebRazorPages/Controllers/AccountController.cs

@ -1,5 +1,5 @@
using ApplicationCore.Interfaces;
using Infrastructure.Identity;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

2
src/WebRazorPages/Extensions/EmailSenderExtensions.cs

@ -1,4 +1,4 @@
using ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using System.Text.Encodings.Web;
using System.Threading.Tasks;

4
src/WebRazorPages/Pages/Account/LoginWith2fa.cshtml.cs

@ -1,5 +1,5 @@
using ApplicationCore.Interfaces;
using Infrastructure.Identity;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

4
src/WebRazorPages/Pages/Account/LoginWithRecoveryCode.cshtml.cs

@ -1,5 +1,5 @@
using ApplicationCore.Interfaces;
using Infrastructure.Identity;
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

2
src/WebRazorPages/Pages/Account/Manage/ChangePassword.cshtml.cs

@ -1,4 +1,4 @@
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

2
src/WebRazorPages/Pages/Account/Manage/Disable2fa.cshtml.cs

@ -1,4 +1,4 @@
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

2
src/WebRazorPages/Pages/Account/Manage/EnableAuthenticator.cshtml.cs

@ -1,4 +1,4 @@
using Infrastructure.Identity;
using Microsoft.eShopWeb.Infrastructure.Identity;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save