المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C# EF5 List Persisting ?



C# Programming
02-26-2013, 08:51 PM
Hi all

I have an annoying problem working with EF5 and Enums, As Enums is supposed to be supported with EF5 I thought this should be an easy matter, but sadly I can't get it behave http://www.barakasoft.com/script/Forums/Images/smiley_frown.gif

I have an Enum

public enum Senddays { AllDays = 9, Monday = 0, Tuesday = 1, Wednesday = 2, Thursday = 3, Friday = 4, Saturday = 5, Sunday = 6 }
And then I have this Class containing a List of said Enums
[Serializable] public class SubscriptionFrequency { public Guid ID { get; set; } public string Name { get; set; } public List Senddays { get; set; } public DeliveryMedia DeliveryMedia { get; set; } public bool Active { get; set; } public SubscriptionFrequency() { ID = Guid.NewGuid(); } }
See straight forward.. or so it seems, but when I try to persist it by EF5 It doesn't create a colum for the Senddays List, but eveything else gets in even the DeliveryMedia, which is also an Enum ??

How do I get the List into the DB ?

Best Regards