작동하지 :키 주석 나는 다음과 같은 오류를 받고 있어요
Error 1 The type or namespace name 'keyAttribute' could not be found (are you missing a using directive or an assembly reference?)
enter code here
c:\users\hp\documents\visual studio 2013\Projects\ProductApps\ProductApps\Models\Product.cs 13 10 ProductApps
내 코드 :
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace ProductApps.Models
{
public class Product
{
[key]
public int Id { get; set; }
public string ProductName { get; set; }
public string Price { get; set; }
public string Description { get; set; }
}
}
인가 나는 오류가 발생하고 해결 방법을하는거야 이유를 제시 할 수 누구?
기본 키를 사용하려고 했습니까 – Aravindan