【发布时间】:2014-03-06 06:16:08
【问题描述】:
我创建了名为“Allocation”的模型,但是当我运行 Add-Migration“Allocation for Deals”时,使用 up() 和 down() 函数打开的迁移文件在函数和表中没有任何查询未在数据库中创建。
我的模型是:-
class Allocation
{
[Display(Name = "ID", ResourceType = typeof(Resources.Resource))]
public int AllocationId { get; set;}
[Display(Name = "CountryID", ResourceType = typeof(Resources.Resource))]
public int CountryId { get; set; }
[Display(Name = "RightID", ResourceType = typeof(Resources.Resource))]
public int RightId { get; set; }
[Display(Name = "Amount", ResourceType = typeof(Resources.Resource))]
public double Amount { get; set; }
}
【问题讨论】:
标签: asp.net-mvc entity-framework