© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
58 replies
BigggMoustache

Scaffolding Error - Requires a primary key to be defined

Here's the class it's referring to
    public class ImageUris
    {
        [JsonPropertyName("small")]
        public string Small { get; set; }

        [JsonPropertyName("normal")]
        public string Normal { get; set; }

        [JsonPropertyName("large")]
        public string Large { get; set; }

        [JsonPropertyName("png")]
        public string Png { get; set; }

        [JsonPropertyName("art_crop")]
        public string ArtCrop { get; set; }

        [JsonPropertyName("border_crop")]
        public string BorderCrop { get; set; }
    }
    public class ImageUris
    {
        [JsonPropertyName("small")]
        public string Small { get; set; }

        [JsonPropertyName("normal")]
        public string Normal { get; set; }

        [JsonPropertyName("large")]
        public string Large { get; set; }

        [JsonPropertyName("png")]
        public string Png { get; set; }

        [JsonPropertyName("art_crop")]
        public string ArtCrop { get; set; }

        [JsonPropertyName("border_crop")]
        public string BorderCrop { get; set; }
    }


I'll be honest I've read the key info in the error link and don't exactly understand what all of this means. I don't quite understand how keys work either.
unknown.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

✅ List<KeyValuePair<Trader, long>> requires primary key to be defined
C#CC# / help
2y ago
✅ Primary Key not recognizing
C#CC# / help
2y ago
❔ Blazor Server - scaffolding Identity error
C#CC# / help
3y ago
A const field requires a value to be provided
C#CC# / help
2mo ago