ForeignKey не распознается в VS2012 RC

вчера после большой помощи я столкнулся с известной ошибкой в ​​​​бета-версии asp.net4 - я обновился до VS2012 RC Express (4.5), а теперь VS сообщает о двух ошибках в моей модели, которые ранее были в порядке:

«Не удалось найти тип или имя пространства имен ‘ForeignKeyAttribute’ (вам не хватает директивы using или ссылки на сборку?)»

«Тип или имя пространства имен «ForeignKey» не может быть найдено (вам не хватает директивы using или ссылки на сборку?)"

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity;

namespace MvcApplication6.Models
{
    public class tblRental
    {
        [Key()]
            public int rental_id { get; set; }
        public int room_id { get; set; }
        public DateTime check_in { get; set; }
        public DateTime check_out { get; set; }
        public decimal room_cost { get; set; }
        public long customer_ref { get; set; }
        [ForeignKey("customer_ref")]
        public virtual tblCustomerBooking Customer { get; set; }

    }

    public class tblCustomerBooking
    {
        [Key()]
        public long customer_id { get; set; }
        public string customer_name { get; set; }
        public string customer_email { get; set; }
        public virtual ICollection<tblRental> Rentals { get; set; }
    }

Кто-нибудь знает, была ли изменена ссылка ForeignKey?

Спасибо за любую помощь,

Mark

13
задан Jonathan 5 June 2012 в 08:27
поделиться