© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
5 replies
Dreams

Why does this code have a Required attribute?

It uses the same
System.ComponentModel.DataAnnotations
System.ComponentModel.DataAnnotations
as the Models in the folder above it, but this isn't a Entity Framework Model

https://github.com/PacktPublishing/ASP.NET-Core-6-and-Angular/blob/main/Chapter_13/WorldCities/WorldCitiesAPI/Data/LoginRequest.cs
GitHub
ASP.NET-Core-6-and-Angular/LoginRequest.cs at main · PacktPublishin...
ASP.NET-Core-6-and-Angular, published by Packt. Contribute to PacktPublishing/ASP.NET-Core-6-and-Angular development by creating an account on GitHub.
ASP.NET-Core-6-and-Angular/LoginRequest.cs at main · PacktPublishin...
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

Similar Threads

✅ required attribute vs [Required] annotation
C#CC# / help
12mo ago
❔ Does Required attribute work for controller parameters?
C#CC# / help
4y ago
why does this code not work???
C#CC# / help
3w ago
❔ Why does this code always return False?
C#CC# / help
3y ago