私は MVC を初めて使用するので、少し高度なガイダンスが必要です。
私は次のクラス、質問のリストを持つドキュメントを持っています。Question には、文書ごとに質問の順番を並べるための order プロパティがあります。
public class Question
{
public int QuestionId {get; set;}
public string Text {get; set;}
public int Order {get; set;}
}
public class Document
{
public int DocumentId {get; set;}
public string DocumentName {get; set;}
public List<Question> Questions {get; set;}
}
質問のリストを含むドキュメントを表示し、ユーザーが質問の横にあるコントロールをクリックして、リスト内で上下に移動できるようにしたいと考えています。
Order プロパティを更新し、変更が行われたときにそれを画面に反映するには、どのコンポーネントを使用すればよいですか? ユーザーがすべての変更を行うまで投稿する必要はないと思いますが、ビューをすぐに更新する最良の方法は何ですか?