0

我想知道是否有人在运行时有其他关于可修改表单的信息来源+如何存储它们。

我有的:

我有 3 个表 atm: 用户(1 对多)Raports(1 对多)ThrashType

报告类:

public class Raport
    {

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public Raport()
        {
            ThrashType = new HashSet<ThrashType>();
            //Raport = new HashSet<Raport>();
        }

        [Key]
        public int raport_id { get; set; }            
        public string who_did { get; set; }
        public string where_from { get; set; }     
        public DateTime creation_time { get; set; }
        public DateTime last_modyfication { get; set; }


        public virtual ICollection<ThrashType> ThrashType { get; set; }

        public virtual AspNetUsers AspNetUsers { get; set; } 
    }

ThrashType 类:

public class ThrashType
    { 

        [Key] 
        public int Key { get; set; }

        //public string Name { get; set; } 
        //or type from dictionary that has around 100 words

        public int Quantity { get; set; } 

        //public string CreatorsName { get; set; } 

        public virtual Raport Raport { get; set; } 

    }

我想要的是:

  • 创建一个用户可以修改的表单(意味着将另一个 ThrashType 实例附加到一个 Raport,然后将其分配给某个用户)
  • 从存储的记录中重新创建用户制作的表格(还包含有关名称、数量等的信息)
  • 了解有关存储序列化数据或数据库灵感的更多信息
  • 获得更多可以提供帮助的文章或信息来源

我读过的:

我不知道的是:

  • 如何在运行时将 ThrashType 的下一个实例附加到 Raport
  • 在拥有自定义 Raport(具有 1-many ThrashTypes)之后如何存储它:

(我的意思是“哪种方式最好”)

a)在数据库中(稍后将通过我将根据客户所说的内容发明的一组查询对其进行分析)
b)如何将其存储在 SQL 会话状态中

我想做的事:

起初我以为我可以将来自表单的信息存储为一个字符串,以后可以从算法中读取(比如“10101011101”和位置会说出它是字典中的什么样的词),但它仍然缺乏数量。查询字符串数据库的数量似乎是一种过分疯狂的想法。我正在考虑混合会话和数据库 - 用于娱乐丢弃工作的会话和用于存储可以分析的现成报告的数据库。无论如何,我需要你的意见和灵感,因为它正在温柔地杀死我。

即使是这个问题的一部分的答案也将是非常需要和非常有用的帮助。

谢谢!

4

0 回答 0