The entity type List`1 is not part of the model for the current context

后端 未结 4 1888
长情又很酷
长情又很酷 2020-12-15 16:57

I\'ve been using Database First, EF 4.1

I am getting \"The entity type List`1 is not part of the model for the current context.\" error when trying to update a recor

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 18:01

    I ended up here despite using code-first EF. The answer to the problem for me was simply not to try to pass a list of entities to the insert method, but insert them one at a time instead:

    entityList.ForEach(context.Insert);

提交回复
热议问题