Entity Framework 面试题与答案
问题 46. What is the purpose of the Attach method in Entity Framework?
The Attach method is used to reattach a disconnected entity to the context, allowing you to update it without having to retrieve it again from the database.
Example:
context.Entities.Attach(disconnectedEntity);
这有帮助吗?
添加评论
查看评论
用户评价最有帮助的内容: