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

Cannot Post: Module 4-3 #43

Open
JayOwl opened this issue Jul 7, 2021 · 1 comment
Open

Cannot Post: Module 4-3 #43

JayOwl opened this issue Jul 7, 2021 · 1 comment

Comments

@JayOwl
Copy link

JayOwl commented Jul 7, 2021

Unmapped members were found. Review the types and members below.
Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters

AutoMapper created this type map for you, but your types cannot be mapped using the current configuration.
CampModel -> Camp (Destination member list)
CoreCodeCamp.Models.CampModel -> CoreCodeCamp.Data.Camp (Destination member list)

Unmapped properties:
CampId
Location

@JayOwl
Copy link
Author

JayOwl commented Jul 7, 2021

The solution was adding:

[DatabaseGenerated(DatabaseGeneratedOption.None)]to the CampModel.cs above public int CampId { get; set; }

This was my solution but I'm not sure if there is a fix present in the module.

@JayOwl JayOwl changed the title Camp Model in Tutorial Not Posting Module 4-3 Cannot Post: Module 4-3 Jul 7, 2021
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