I am working on the repository pattern I have made a table in the model class shown in bold font .
using System.ComponentModel.DataAnnotations;
namespace RepositoryPattern.Models
{
public class Unit
{
[Key]
int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
}
But in the below picture the Package Console Manager is showing this output.

Muhammad Imran AnsariPosted Mar 28, 2022, 7:34 AM
@Arbaz,
What error you are getting? Add error description here.
Secondly, Check Runtime Version of used 'System.ComponentModel.DataAnnotations' under dependencies head.
Third,
System.ComponentModel.DataAnnotations namespace are in the System.ComponentModel.Annotations package, which is not installed by default in a .Net Standard library, so you need to install it manually to use it there from:
https://www.nuget.org/packages/System.ComponentModel.Annotations/