开发者

'SelectListItem' has no key defined?

After creating a telerik-mvc3 project I made some models. I used scaffolding for creating the controller, the views. when I Started the app I get this error:

    System.Data.Edm.EdmEntityType: : EntityType 'SelectListItem' has no key defined. Define the k开发者_如何学JAVAey for this EntityType.
System.Data.Edm.EdmEntitySet: EntityType: EntitySet �SelectListItems� is based on type �SelectListItem� that has no keys defined.

on return View(context.Medewerker.ToList());

I don't have created the edm file, I do have on each table an ID with a primary key. In the model I added [Key] as attribute to the id.

What else must I do?

Thanks


Yes, I do Entity FrameWork With the addon MvcScaffolding

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜