CRM 2016 FakeXrmEasy N:N relationships

前端 未结 1 1289
陌清茗
陌清茗 2021-01-19 00:13

I\'m trying to use FakeXrmEasy to perform some unit tests for CRM Online (2016) and I\'m having problems setting up one of my tests with an N:N relationship

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-19 00:49

    Please try adding a fake relationship as shown here

    This is because for N:1 there's no intersect table, joins are performed via an EntityReference and that's it, but for many to many, as there is an intersect table, we need to tell the framework how to deal with this scenario for now.

    There was also an update where it is no longer mandatory to use ProxyTypesAssembly, as long as you use early bound types, the proxy types assembly will be "guessed" from your types.

    So you could remove this

    context.ProxyTypesAssembly = Assembly.GetAssembly(typeof(New_entityOne));
    

    I'll need to update the documentation in the web site... whenever I have a chance :)

    Edit

    Web site updated: http://dynamicsvalue.com/get-started/nn-relationships

    0 讨论(0)
提交回复
热议问题