csla: AmbiguousMatchException DataPortal.Fetch

Describe the bug Upgrading to 5.4.1 has a breaking change. Can’t have a DataPortal Interface method parameter without decorating method with [Fetch] attribute.

private void DataPortal_Fetch(ICriteriaBase criteria)
private void DataPortal_Fetch(IEnumerable<string> criteria)

Also happens using the new modifier on DataPortal_Execute. protected new async Task DataPortal_Execute

Version and Platform CSLA version: 5.4.1 OS: Windows, Linux, iOS, Android, etc. Platform: WinForms, WPF, ASP.NET Core, MVC, Xamarin, etc.

Code that Fails Sample app runs fine using 5.4.0. You will need to update csla to 5.4.1 to cause the error in the sample app. https://github.com/coder-rr/CslaDpTest

Stack Trace or Exception Detail Exception Message

CslaDpTest.CarList.[Fetch](String[]). Matches: 
CslaDpTest.CarList[Void DataPortal_Fetch(System.Collections.Generic.IEnumerable`1[System.String])],
Csla.ReadOnlyListBase`2[[CslaDpTest.CarList, CslaDpTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],
[CslaDpTest.CarInfo, CslaDpTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]][Void DataPortal_Fetch(System.Object)]

Stack Trace

at Csla.Reflection.ServiceProviderMethodCaller.FindDataPortalMethod[T](Type targetType, Object[] criteria, Boolean throwOnError)
at Csla.Server.DataPortal.<Fetch>d__11.MoveNext()

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Regardless, this was a bug that needed fixing, and I’m glad you brought it up and helped figure it out! Thank you.

Thanks for looking into this. Our next application release will contain refactored business objects to include the data portal operation attribute.

On Mon, Apr 5, 2021 at 1:30 PM Rockford Lhotka @.***> wrote:

@coder-rr https://github.com/coder-rr sorry for not getting to this for a while. I believe I’ve updated the code in the test https://github.com/rockfordlhotka/csla/blob/26bfb1818410465eb45bb5a906ae0fb230867872/Source/csla.netcore.test/DataPortal/ServiceProviderMethodCallerTests.cs#L253 to reflect your scenario, and it is still not failing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MarimerLLC/csla/issues/2109#issuecomment-813561564, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWVTIGJHFTL4MVFMGM2MIDTHH6VPANCNFSM4XZAWDWQ .

It has been fixed in Main, but it is broken in 5.4.1