0
    
    
        
                    safi created
                    
                    
                    
                
                Hi
I have created a entity from abp suite and now wants to create non clustered indexes for some column so can you please suggest me how I can do this or need to do modification in migration file.
Thanks,
4 Answer(s)
- 
    1Hi, Open your <YourProjectName>DbContextModelCreatingExtensions.csclass and useHasIndexto configure your entity.Example: builder.Entity<MyTest>(b => { b.ToTable(qaConsts.DbTablePrefix + "MyTests", qaConsts.DbSchema); b.ConfigureByConvention(); b.Property(x => x.Name).HasColumnName(nameof(MyTest.Name)); // add this // specify name as an index b.HasIndex(x => x.Name); });Use the add-migration <migration file name>command to add migration file and run theDbMigratorproject apply migration.
- 
    0Hi I added above lines in specified file but If I am trying to add migration getting dept.json file not exist error. 
- 
    0Can you share some screenshots? 
- 
    0It's done now...Thanks @liangshiwei 
 
                                