storing enum to database in entity

DoubleDMix

New Member
i am trying to pass a dropdown selected value to database my datacontracts has the following code\[code\] public EnumTypes.RegardingObjectType RegardingObjectType { get; set; } public Guid RegardingObjectId { get; set; }\[/code\]enumtypes.cs has the following\[code\] public class EnumTypes{ public enum RegardingObjectType { UnknownOrNone = 0, Account = 1, Cellsite = 2,\[/code\]eventdal.cs has the following\[code\] private t_Event MapEventToEntity(Event newevent, t_Event eventToBeChanged) { eventToBeChanged.RegardingObjectType = int.Parse(newevent.RegardingObjectType.ToString());\[/code\]it builds fine but getting exception while running
 
Back
Top