我正在尝试将下拉选择的值传递给数据库我的数据合同具有以下代码
public EnumTypes.RegardingObjectType RegardingObjectType { get; set; }
public Guid RegardingObjectId { get; set; }
enumtypes.cs 有以下内容
public class EnumTypes
{
public enum RegardingObjectType
{
UnknownOrNone = 0,
Account = 1,
Cellsite = 2,
eventdal.cs 有以下内容
private t_Event MapEventToEntity(Event newevent, t_Event eventToBeChanged)
{
eventToBeChanged.RegardingObjectType = int.Parse(newevent.RegardingObjectType.ToString());
它构建良好,但在运行时出现异常