i have a simple array inside a model using the entity framework 5. The array will not saved inside the table.
Model
public class MyModel: IEntity
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public IList<string> MyArray { get; set; }
}
Config
DbContext.Configuration.ProxyCreationEnabled = true;
DbContext.Configuration.LazyLoadingEnabled = true;
DbContext.Configuration.ValidateOnSaveEnabled = false;
Initializer
internal class DatabaseInitializer : DropCreateDatabaseIfModelChanges<DatabaseContext>
{
protected override void Seed(DatabaseContext context)
{
context.MyModels.Add(new MyModel {
MyArray = new [] { "Value1", "Value2" }
});
}
}
Any hint why this does' not work. MyArray not event appear as a column.