Skip to content

A UWP MVVM shopping App, with Prism.Unity, Entity Framework Core and SQLite. Built with VS 2017.

License

Notifications You must be signed in to change notification settings

Avi-Meshulam/MyStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyStore

A UWP MVVM shopping App, with Prism.Unity, Entity Framework Core and SQLite. Built with VS 2017.

Startup Screen

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))

Features/Tools:

Views

  • 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).

    Shopping Cart

    App & View Objects

    App & Views

DB structure

ERD

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.

EF Core DB Context Class

DB Context

Each table is associated with a:

  • 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>.

Models

Models

View Models

View Models

Repositories

Repositories

Notes

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.

Solution: Edit Registry and Component Services permissions

Releases

No releases published

Packages

No packages published

Languages