Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum Issue with DynamoDB and .Net core 3.1 #27813

Open
vinaymalasiE opened this issue Sep 11, 2022 · 0 comments
Open

Enum Issue with DynamoDB and .Net core 3.1 #27813

vinaymalasiE opened this issue Sep 11, 2022 · 0 comments

Comments

@vinaymalasiE
Copy link

vinaymalasiE commented Sep 11, 2022

I have enum property

public enum RequestUser{
None = 0,
Complaint = 1,
Appraisal = 2,
NewJob = 3,
Enquiry = 4,
}

Defining this Property in the Model class

 [JsonPropertyName("request_user")]
        [JsonConverter(typeof(StringNullableEnumConverter<RequestUser?>))] 
        public RequestUser? MessageType { get; set; } 

When I am trying to save this property in DynamoDB through .Net core its always throws Exception.

Type System.Nullable1[[Billing.Models.Enums.MessageTypeId, Billing.Models, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] is unsupported, it cannot be instantiated`

image

Does anyone know how can I save Enum into DynamoDB with .net core 3.1?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant