Commit Graph

54 Commits

Author SHA1 Message Date
Steve Smith
b4d0f07c2e Adding API Endpoints for Catalog Items (#410)
* Adding new Endpoints

* update nuget packages

* Modifying API to work well with Swagger.

* Remove Swashbuckle.Core
2020-06-25 16:23:44 -04:00
David Pine
0af21d22f5 Inspired by dotnet show (#386)
* Changed the order of the projects, Web first to infer as startup.

* Added encapsulated JSON serialization - and moved to System.Text.Json

* Refactored a few minor updates out

Co-authored-by: Eric Fleming <eric-fleming18@hotmail.com>
2020-06-11 15:47:05 -04:00
Cédric Michel
516d87aaa1 manage basket checkout after login (#371) 2020-05-06 15:53:52 -04:00
Eric Fleming
599db2ee26 Removing unneccesary method call (#363) 2020-04-09 16:10:08 -04:00
Steve Smith
fa8839e1d8 Minor 3.x Updates (#339)
* remove unnecessary call

* Refactoring test fixture
2019-12-18 16:59:25 -05:00
Eric Fleming
9695e9e3ba Adding a ConfigureTestingServices (#335) 2019-12-11 21:59:45 -05:00
Eric Fleming
f3f74a342e Admin page (#324)
* Updates based on documentation

* Getting the build passing

* Getting app functioning

* A few cleanups to confirm it's working as expected

* Fixing functional tests

* Updating dockerfile for 3.0

* Functional Tests now run sequentially

* Updating to latest version of moq

* Adding migration for post 3.0 upgrades

* Removing commented out lines

* Moving address and catalogitemordered configuration in to classes that own them

* Adding admin user

* Adding admin catalog screen

- will also only display menu option if user is logged in as an admin

* WIP - squash this

* Allow user to edit a catalog item

* Adding entry for new service

* Invalidating cache after catalog item update

- also a little bit of cleanup

* Fixing bad merge

* Removing Picture Uri and making Id readonly

* Adjusting style in menu dropdown so all options are shown

* Creating Cache helpers with unit tests
2019-12-10 22:04:59 -05:00
Eric Fleming
29d1497a3f Mediatr example (#325)
* Updates based on documentation

* Getting the build passing

* Getting app functioning

* A few cleanups to confirm it's working as expected

* Fixing functional tests

* Updating dockerfile for 3.0

* Functional Tests now run sequentially

* Updating to latest version of moq

* Adding migration for post 3.0 upgrades

* Removing commented out lines

* Moving address and catalogitemordered configuration in to classes that own them

* Installing MediatR nuget packages

* Configure MediatR in Startup

* Creating GetMyOrders MediatR query and handler

* Adding GetOrderDetails MediatR handler

* Refactoring out default values

* Added tests for GetOrderDetails mediator handler

* Defaulting values on Models for now

* Removing some spaces

* Splitting files

* Splitting out the GetOrderDetails files

* Adding test for GetMyOrders

* restructuing folders

* Using constant
2019-11-15 13:36:51 -05:00
Eric Fleming
4442015835 Netcore3.0 (#323)
* Updates based on documentation

* Getting the build passing

* Getting app functioning

* A few cleanups to confirm it's working as expected

* Fixing functional tests

* Updating dockerfile for 3.0

* Functional Tests now run sequentially

* Updating to latest version of moq

* Adding migration for post 3.0 upgrades

* Removing commented out lines

* Moving address and catalogitemordered configuration in to classes that own them

* Minor cleanups
2019-11-06 14:17:56 -05:00
Eric Fleming
4fb07d4d88 Configuring to use In-Memory Database by default 2019-08-19 21:46:14 -04:00
Steve Smith
305be555db Updated packages; Using configuration classes for EF Core. 2019-08-18 15:16:31 -04:00
Eric Fleming
d5446de65f Adding scaffolding for Logout page
- Removing Identity route from startup
2019-06-20 20:41:00 -04:00
Eric Fleming
69dafa29e2 No need to pass in a LinkGenerator anymore 2019-04-05 22:06:07 -04:00
Eric Fleming
05767d6afc Switch to using NuGet package for listing all registered services 2019-04-05 21:10:14 -04:00
Eric Fleming
555c3295f1 Renaming CatalogServices to CatalogViewModelService
- I believe this causes some confusion when people see "Service" in the Web project. We have another service in there named BasketViewModelService instead of BasketService anyways. Adding "ViewModel" to the name is a better representation of what the "services" in the Web project represent.
2019-03-30 15:29:32 -04:00
Eric Fleming
8a00269ebd Removing IRepository
- This also involved cleaning up places where IRepository was still being references in Startup
- Removed unused repository from Basket service
2019-03-01 22:21:12 -05:00
Steve Smith
765e1508bf Got RedirectToLoginIfNotAuth test working 2019-02-22 14:21:14 -05:00
Eric Fleming
fbde5dae90 Added scaffolded Login page for Identity
- Also updated the _LoginPartial to use the new page
2019-02-15 21:54:35 -05:00
Steve Smith
1b610dd7a4 Adding functional tests (#197)
* Working on login tests

* Testing login with an integration test

Working on login functional test.

* Got functional login test working
2019-01-25 13:13:01 -05:00
Steve Smith
99c416142f Consolidate Web and WebRazorPages Projects (#192)
* Moved Privacy, Home page to Razor Pages

* Migrating Basket from RazorPages to Web.

* Removed BasketController; refactored viewmodels

* Moved BasketComponent into Pages/Shared
Added auth rules to Startup for Pages
Added notes to controllers about Pages usage.

* Fixed broken my orders test
Consolidated Functional Tests

* Fixed logo link to home page
Fixed Order Detail Total $ format
2019-01-18 13:29:00 -05:00
Steve Smith
483340f21e Adding API Health Check (#191) 2019-01-18 11:48:26 -05:00
Steve Smith
84f1eeee8c Added HealthCheck (#188)
Checks home page.
2019-01-11 13:27:15 -05:00
Steve Smith
c64c70b183 Add LinkGenerator to AllServices middleware (#187)
* Adding slugify parameter transform

Fixes #172

* Cleaning up code

And slugifying my orders

* Added links to allservices using LinkGenerator
2019-01-11 12:53:08 -05:00
Steve Smith
bc328077b0 Adding slugify parameter transform (#185)
* Adding slugify parameter transform

Fixes #172

* Cleaning up code

And slugifying my orders
2019-01-11 12:39:48 -05:00
Steve Smith
6c41a1bab9 Upgrade to 2.2 (#171)
* Initial Web2 project working

* Initial WebRazorPages project working

* Adding additional sln files

* Removing old project

* Fixed integration tests

* Getting FunctionalTests working.

* Got Swagger working in Web

* Moved web2 to web
2018-12-28 10:04:35 -08:00
Steve Smith
faa41f9d89 Cleaning up real db configuration 2018-06-05 11:57:50 -04:00
Jeremy Hutchinson
f953495e38 Standardize namespaces to all be under the Microsoft.eShopOnWeb namespace and update default namespaces. (#102) 2018-06-05 08:52:54 -04:00
Steve Smith
814d3e249c Adding Tests and Refactoring
Functional Tests for RazorPages added
2018-05-31 12:28:55 -04:00
Steve Smith
074bdb2a66 Adding functional tests using WebApplicationFactory 2018-05-29 22:20:07 -04:00
Steve Smith
9075221073 Added docker support 2018-05-22 14:23:55 -04:00
Steve Smith
80604062d9 Updating to 2.1RC1 2018-05-19 17:13:55 -04:00
Steve Smith
3d46c80cff Adding 2FA Authenticator Support (#66)
* Adding support for 2fa, more auth options

* WIP getting auth stuff working

* Added Manage views. 2FA working now for MVC app.

* Switching to using a controller for no-UI logout scenario

* Adding Razor Pages impl of 2FA auth stuff. Works.
2017-10-23 21:58:21 -04:00
Steve Smith
16d81ae450 Refactoring Services (#61)
* Refactoring ViewModels into Razor Pages models

* Cleaning up Basket viewcomponent

* Refactoring services.
Fixed bug in basket item counter.
2017-10-23 10:52:33 -04:00
Steve Smith
dea73a5f5e Adding Razor Pages Version (#60)
* In progress copying code into new RP project
Cleaning up namespaces and whitespace in original Web project

* Cleaning up some more namespaces

* Removing unused page.

* Index page loads correctly.

* Fixing up paging.

* Moving views; getting ready to convert to RPs

* Auto stash before merge of "master" and "origin/master"

Basket and Checkout pages wired up

* WIP on Account pages

* Working on signin/signout

* Working on auth

* Getting order history working
Fixing auth bug

* Fixing Checkout issue

* Fixing link
2017-10-23 09:23:57 -04:00
Steve Smith
0eb4d72b89 Refactoring and Adding Tests (#58)
* Moving Identity seeding to its own class and method.

* Adding tests for AddItem

* Added catalog api controller and functional tests
Added and cleaned up some comments

* Adding integration tests for OrderRepository

* Getting integration test for order working with inmemory db
2017-10-20 12:52:42 -04:00
Steve Smith
32950aa175 Cleaning up EF 2.0 Migrations (#57)
Moving Seed logic to Program.cs
2017-10-18 14:25:10 -04:00
Alan Macgowan
d52dbb1915 Removed duplicate memory cache services (#55)
Removed duplicate line services.AddMemoryCache();
2017-10-18 13:00:03 -04:00
Steve Smith
aca618316a Initial Upgrade to .NET Core 2.0 (#50)
* Ardalis/upgrade1 (#44)

* Upgrading to netcore 2.0
Updating repository to support async options and refactoring to use it.

* Starting work on tracking customer orders feature.

* Cleaning up some bugs
Working on basket view component implementation

* Fixing up styles, especially for basket in header.

* Adding Order Features (#47)

* Working on order model binding from checkout page - WIP

* Small layout tweaks (#43)

* Updating quantities implemented.

* Fixed basket widget count

* Order History (#49)

* working on creating and viewing orders.
* Working on wiring up listing of orders
* List orders page works as expected. Needed to support ThenInclude scenarios. Currently using strings.
2017-09-22 11:28:55 -04:00
Steve Smith
ecb4889dd3 Basket persistence (#41)
* Renamed Cart to Basket throughout
* Implemented cookie-based anonymous basket handling and transfer to user upon login. Still need to implement transfer upon registration.
2017-08-22 13:51:08 -04:00
Steve Smith
f0c8f3e234 App Startup (#34)
* Adding ConfigureProduction as copy of ConfigureDevelopment.

* Configuring bundling and updating default appsetting value to work for local images (the setting is still useful for CDN scenarios).
2017-08-08 20:37:51 -04:00
Steve Smith
97ef1c79a0 Controller cleanup (#30)
* Cleaning up routes.

* Adding signout functionality

* Added simple checkout behavior
2017-08-07 14:12:48 -04:00
Steve Smith
d7eb59c097 Refactoring and Adding Tests (#28)
* Introducing repository and refactoring services.
Changing entities to use int keys everywhere.

* Refactoring application services to live in web project and only reference repositories, not EF contexts.

* Cleaning up implementations

* Moving logic out of CatalogController
Moving entity knowledge out of viewmodels.

* Implementing specification includes better for catalogservice

* Cleaning up and adding specification unit tests
2017-08-07 13:25:11 -04:00
Steve Smith
084db74c77 data refactor (#27)
* Refactoring to move data access code into Infrastructure project

* Fixing namespaces
2017-08-07 10:08:41 -04:00
Steve Smith
b67f8cc050 Cart Updates (#26)
* ardalis/cart-updates

Updating how items are added to cart and displayed in cart.

* Cleaning up UI
2017-08-07 09:49:12 -04:00
Steve Smith
acdc072cb9 Merge branch 'ardalis/basket-add' into master 2017-07-27 11:39:42 -04:00
Steve Smith
af406f86ef Updated logging
Moved images to use static files
Got login working with demo user.
2017-07-26 17:30:29 -04:00
Steve Smith
925ad6b557 Cleaning things up and getting add item to cart working for anonymous or authenticated users. 2017-07-24 16:45:54 -04:00
Steve Smith
dfe0106ce3 Unit tests working; added logger adapter. 2017-04-30 08:06:06 -04:00
Steve Smith
5dbbc4c791 Adding unit tests, refactoring file access to a service, adding CatalogImageMissingException. 2017-04-28 19:56:32 -04:00
Steve Smith
708e85233e Updated data chapter with EF, caching, NoSQL
Added caching support and some diagnostic code.
2017-04-23 16:24:19 -04:00