KorzhCom/EasyData

SetIndex method is not functional for reordering attributes

veyselerCS opened this issue · 0 comments

using SetIndex(int index) method on entity attributes does not result to a correctly reordered set of attributes in EF view.
Reordering is done right after the ProcessEntityType method call in DbContextMetaDataLoader but CustomizeModel is called in later stages as far as i understand.

Example usage :

options.UseDbContext<FooContext>(opts => 
{
    opts.CustomizeModel(model =>
    {
        model.Entity<BarEntity>().Attribute(b => b.BazAttribute).SetIndex(<index_to_set);
        //...
    });
}