c# - Put an array in to a column -


i want use ef code first create column table task, array. how?

public class task {      // presumption code      public string[] attempts { get; set; } 

the attempts has

   attemptsmetadata---maybe string    time            ---datatime    answered        ---bool 

create property used in code (and mark ignore) , other property used in code.

edited

public class task {     [ignore]     public string[] attempts { get; set; }      public string attemptsmetadata     {                 {             return attempts != null && attempts.any()                 ? attempts.aggregate((ac, i) => ";" + ac + i).substring(1)                 : null;         }         set { attempts = value.split(';'); }     } } 

ps:
strategy has 1 flaw. when use repository expressions cannot use ignore property. never find way so.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -