Best way to implement “ReOrderable Collection” and Persist it to database

前端 未结 6 779
执笔经年
执笔经年 2021-01-03 12:12

My domain object :

public class MyDomainObject
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public int DisplayOrder { get; set         


        
6条回答
  •  轮回少年
    2021-01-03 12:57

    For what I can see it seems that DisplayOrder has the same value of the index property of the collection. So I will try to use that instead of a DisplayOrder property. On the DB I will use the DisplayOrder column to read and save the items but not on the domain objects. HTH ema

提交回复
热议问题