This is a simple line of business application written in DotVVM, based on the well-known Microsoft sample Northwind database.
- Get access to the DotVVM Business Pack
- You can request a free 30-days trial. To do that, sign up for an account at DotVVM website and request the trial of DotVVM Business Pack.
- If you have already purchased the license, you are all set.
- Make sure you have installed DotVVM for Visual Studio
- Sign in with your account in DotVVM for Visual Studio in order to be able to access the NuGet package with DotVVM Business Pack:
-
Open the GitHub repo in Visual Studio or
git clone https://github.com/riganti/dotvvm-samples-northwind.git
-
Right-click the
NorthwindStore.App
project and select View > View in Browser -
Use admin / admin credentials on the login screen.
- How to make a simple CRUD page with DotVVM components (Regions section)
- How to make generic CRUD ViewModels with extensibility points (Categories section)
- How to work with modal dialogs and row selections (Products section)
- How to generate the UI dynamically from the data model using DotVVM Dynamic Data (Suppliers section)
- How to create a global error-handling action filter
- How to use a custom presenter to serve images from the database
- How to use Application Insights and MiniProfiler with DotVVM to get diagnostics data
The application demonstrates how DotVVM can be used in larger applications.
-
The
DAL
project (Data Access Layer) contains theEntity Framework Core
model describing the SQL database. -
The
BL
project (Business Layer) contains the application logic. It utilizes the Riganti Utils Infrastructure library, but any other way of implementing and exposing business logic can be used. From the DotVVM perspective, only the classes in theFacades
andDTO
directories are interesting, because they contain all methods and model classes the application needs (aka Model). DotVVM doesn't have any specific requirements on the business layer, however it is a good idea to have the application logic and DTO objects in a separate class library project - do not pass Entity Framework entities in the presentation layer. -
The
App
project contains the application itself.-
The
RegionList
andRegionDetail
pages demonstrate how to do a simple CRUD functionality, by just using the facade. -
The
CategoryList
andCategoryDetail
pages demonstrate how to generalize the CRUD using a generic class and interfaces for facades. -
The
ProductList
andProductDetail
pages shows how to customize the CRUD with combobox selectors, custom controls and modal dialogs. -
The
Default
page shows how to use authentication and authorization. -
Using custom presenters to serve images.
-
And finally, the Application Insights and MiniProfiler integration is demonstrated.
-
The sample uses the following libraries:
- Entity Framework Core
- AutoMapper
- Castle Windsor
- Riganti Utils Infrastructure