无法将dbSet隐式转换为ObjectQuery

时间:2013-10-30 16:08:58

标签: entity-framework object dbset

这是我的代码,它不能像这样工作,请帮帮我!!!

public class BL: IBL, IDisposable
{

    private TradeSoftDBEntities entities;

    public List<Roles> TakeRoles()
    {

        if (entities == null) 
            entities = new TradeSoftDBEntities();

        ObjectQuery<Roles> roles = entities.Rolis;

        roles.MergeOption = MergeOption.NoTracking;

0 个答案:

没有答案