CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

CSLA 4.2.2: DataPortal.Create Failed

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 1 Follower

Top 200 Contributor
42 Posts
cjherasmus posted on Mon, Apr 16 2012 7:08 AM

I'm using the Encapsulated Invoke DTO method, EF and SL (UI).

I have a stored procedure that joins several tables which accepts an Id parameter of type Guid. It returns a list of records per Id. I've mapped the stored procedure with EF in VS2010 via Function Imports.

If I pass the Id parameter to the ROLB BO, I get the error: "DataPortal.Create failed, Invalid operation - create not allowed at Csla.ReadOnlyListBase.DataPortal_Create(Object criteria)".

I have other ROLB and NVL which all works correctly but they don't use parameters.

I'm not sure why Create is called in the ROLB.

-------------------------------------------------------------- Casper JH Erasmus

Answered (Verified) Verified Answer

Top 10 Contributor
1,766 Posts
Verified by cjherasmus

Make sure that your static factory method call

DataPortal.Fetch  - not DataPortal.Create.

Jonny Bekkum, Norway CslaContrib Coordinator

All Replies

Top 10 Contributor
1,766 Posts
Verified by cjherasmus

Make sure that your static factory method call

DataPortal.Fetch  - not DataPortal.Create.

Jonny Bekkum, Norway CslaContrib Coordinator

Top 200 Contributor
42 Posts

Thanks Jonny, just needed a extra pair of eyes :-)

-------------------------------------------------------------- Casper JH Erasmus

Page 1 of 1 (3 items) | RSS

Copyright (c) 2006-2010 Marimer LLC. All rights reserved.
Email admin@lhotka.net for support.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems