Aleksander Dudek
Aleksander Dudek

Reputation: 133

ASP.NET - Editable form at runtime + storing info about it in database/SQL session state

I was wondering whether someone has another sources of info about modifiable forms at runtime + how to store them.

What I have:

I have 3 tables atm: Users (1 to many) Raports (1 to many) ThrashType

Raport class:

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 class:

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; } 

    }

What I want:

What I've read:

What I don't know:

(by how I mean "which way would be best")

a) in database (it will later be analized by a set of queries I'll invent based on what client will say)
b) how to store it in SQL session state

What I wanted to do:

At first I thought that I could store information from form as a string that could be read from alghoritm later (like "10101011101" and position would say what kind of word from dictionary it is), but still it lacks the quantities. Querying string database for quantities seems like overkill-crazy idea. I'm thinking about mixing session and database - session for recreation of dropped work and database for storing ready reports that could be analized. Anyway I need your opinion and inspiration because it's killing me softly.

Even an answer to 1 part of this problem would be of very much needed and appriecieted help.

Thanks!

Upvotes: 0

Views: 39

Answers (0)

Related Questions