0
在我的系统(C#,MVC,MSSQL,实体框架)我有一个雇员类员工离职授权字典。向数据库添加数据从字典MVC实体框架
public Dictionary<string, EmployeeLeaveEntitlement> LeaveEntitlementDetails { get; internal set; }
EmployeeLeaveEntitlement类,如下所示,
/// <summary>
/// Gets or sets the type of the leave.
/// </summary>
/// <value>The type of the leave.</value>
public string LeaveType { get; set; }
/// <summary>
/// Gets or sets the entitlement.
/// </summary>
/// <value>The entitlement.</value>
public double Entitlement { get; set; }
/// <summary>
/// Gets or sets the availed count.
/// </summary>
/// <value>The availed count.</value>
public double AvailedCount { get; set; }
我需要的是一个数据库连接到系统中,由于员工
我已经创建的上下文,
public DbSet<Employee> Employees { get; set; }
当我运行该系统将创建数据库,但没有表或列的权利..是否有一种方法可以添加数据到数据库从一个D ictionary?
帮我
Thanks in Advanced。
Ohhh很棒..谢谢Eranga – iJay