The application consists of 2 projects:
- MyStore - UWP App client
- MyStore.BL - UWP class library (contains both business logic and data access logic (via EF core))
-
DB: SQLite
-
DB Access: EF Core
-
MVVM/IoC: Prism.Unity
-
Notifications via NotificationsExtensions library:
- Live Tiles
- Badge Notifications
- Background Tasks (updating tiles & badges)
-
Main: Container for all other views. Hosts application's header (app title, menu button and shopping cart button) and an extractable side menu. The rest of the view is a placeholder frame for other views.
-
Catalog: Displays a product card (picture, title, price) for each product in catalog, while beneath each card there's a button, allowing to add it to shopping cart.
-
Shopping Cart: Lists all shopping cart items in a table view, allowing to manipulate quantities, delete items and commit a checkout (place an order).
Table | Remarks |
---|---|
Catalogs | A Catalog is a group of products that share a common subject |
Products | A Product is associated with a catalog (currently only one catalog per product(1)) |
Customers | A customer is based on the current user logged in Windows |
ShoppingCarts | A shopping cart is associated with a customer |
ShoppingCartItems | A shopping cart item is associated with a shopping cart and a product. |
Orders | An order is basically a copy of a shopping cart after checkout, and is also associated with a customer. |
OrderItems | An order item is a copy of a shopping cart item after checkout, and is associated with an order and a product. |
(1) if you need to associate a product with multiple catalogs, it is adviced to create a new table, e.g. CatalogsProducts, which will link between catalogs & products. The new table will replace the field CatalogId in Products table.
- Model - Reflects the table fields and inherits from Equatable<T> (also implements IEquatable<T> in order to allow explicit implementation).
- View Model - Inherits from ViewModeBase<T>, which in turn inherits from Prism.Windows.Mvvm.ViewModelBase.
- Data Repository/Controller - Implements IDataRepository<T>.
In case the application terminates unexpectedly, and the following error apears in Windows Event Viewer - try the following solution to fix that.
Event Viewer Log Message:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {CLSID} and APPID {APPID} to the user from address LocalHost (Using LRPC) running in the application container Microsoft.Windows.Cortana... This security permission can be modified using the Component Services administrative tool.