昨天我在Management Studio中创建了数据库,现在我想使用EF Code First在程序中创建它.
这是我的数据库的链接:http://s11.postimg.org/6sv6cucgj/1462037_646961388683482_1557326399_n.jpg
我做了什么:
public class GameModel
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public DateTime CreationTime { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public string TotalTime { get; set; }
public DateTime RouteStartTime { get; set; }
public DateTime RouteEndTime { get; set; }
public int MaxPlayersPerTeam { get; set; }
public int CityId …Run Code Online (Sandbox Code Playgroud)