EntityFramework.Extended更新导航属性

时间:2013-10-24 16:24:20

标签: entity-framework

我的代码是

public void MoveProducts(int currentCategoryId, int newCategoryId)
{
        _dbContext.Products.Update(p => p.Category.ID = newCategoryId);
}

p => p.Category.Id = newCategoryID引发错误

Cannot implicitly convert type 'int' to 'DAL.Models.Product

我使用EntityFramework.Extended来执行批量更新。 如何解决这个问题?

0 个答案:

没有答案
相关问题