Grid.Blazor
Grid.Blazor copied to clipboard
Not working with sample northwind db from microsoft in sql express
This looks great but Not working with sample northwind db from microsoft in sql express. Do I have to download special northwind db from this link?
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs
You can download the database from https://github.com/gustavnavar/Grid.Blazor/blob/master/GridMvc.Demo/App_Data
Alternatively, if you prefer to install a fresh version of the database you can perform the following steps:
- run this script from Microsoft web to create a new database: https://github.com/microsoft/sql-server-samples/blob/master/samples/databases/northwind-pubs/instnwnd.sql
- add a column to the Customers table with the name IsVip of type bit (NOT NULL) and default value 0:
USE Northwind; ALTER TABLE dbo.Customers ADD IsVip bit NOT NULL DEFAULT 0 WITH VALUES; GO
- change manually some values of the new IsVip column to True
- review the datetime columns. Any mismatch between EF Core model and database definitions will produce an exception and filtering will not work as expected. If database columns are defined as datetime you must modify the NorthwindDbContext class including:
for each datetime column. Or you can change all database columns' type to datetime2(7).modelBuilder.Entity<Order>().Property(r => r.OrderDate).HasColumnType("datetime");