我正在開發MVC應用程序,其中,我試圖創建由MVC應用程序生成的部分類讓位置類說。創建部分類時發生錯誤
現在我想在新的類文件中創建位置類的部分類。
以下類代碼由位置代碼的MVC自動生成。
namespace CRM
{
public partial class Location
{
public int Id { get; set; }
public string Name { get; set; }
public string Remark { get; set; }
}
}
我已經加入其中包含部分類上述文件的新的類文件
namespace CRMEntities.Partial_Class
{
public interface ILocation
{
[StringLength(50, ErrorMessage = "Region can accept maximum 50 characters.")]
string Region { get; set; }
[Key]
int Id { get; set; }
[Required]
string Name { get; set; }
string Remark { get; set; }
}
public partial class Location : ILocation
{
}
}
它給下面的錯誤... CRMEntities.Partial_Class.Location' does not implement interface member 'CRMEntities.Partial_Class.ILocation.Name
請現在檢查... – nilesh1foru 2012-08-04 12:45:14