Hinsura
1/8/2018 - 9:21 AM

Create Page from Scratch

1. Create the Entity. Health.Core\Products\Sickness.cs

2. Run update-database from the package manager to create the table, indexes and constraints. Import data to table if necessary.

3. Make sure you add the DbSet entity in the DbContext file. Health.EntityFramework\EntityFramework\HealthDbContext.cs

4. Create methods  in the manager interface file (ex: IProductManager).

5. Create repository  and their EF methods in the manager file (ex: ProductManager).

6. Give access to the page.
    a. Create permission name in Health.Core\Authorization\PermissionNames.cs
    b. Create the menu item in Health.EntityFramework\Migrations\SeedData\SecurityCreator.cs
    c. run the unit test in Health.Tests\Security\SecurityCreatorTest.cs to migrate the data.

7. Uygulama Yönetimi > Ayarlar > Admin > Düzenle > Yetkiler - check the new item to give access to admin users - make it show in the menu.