breaking changes - DataPortal methods not being reached

breaking changes - DataPortal methods not being reached

Old forum URL: forums.lhotka.net/forums/t/529.aspx


brettswift posted on Monday, July 03, 2006

Ok, I read the changelog and see that the DataPortal Calls now have to match, but I'm seeing some weird stuff, and have tried every combination (except the one that works) so maybe someone can point it out right away..

(This is with a new class I've created - a User class - which has an Int64 for a PK... I've had this work when using a GUID because then its easy, you can just go BO.NewBO(new Guid());, but with an int, you can't set the ID until it has done a round trip from the DB).

This is one error I get, another member posted on the same problem but didn't get any replies.
DataPortal_Create(object)' hides inherited member 'Csla.Core.BusinessBase.DataPortal_Create(object)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.   


Code:

        public static User NewUser()
        {
            return DataPortal.Create<User>(new object());
        }

        [RunLocal()]
        private void DataPortal_Create(object criteria)
        {

        }

Supposedly this should work, and the create works for my user, but for the Role class, it throws an error in the DataPortal.  hmm.

In my user class, set up as it is above, my DataPortal_Insert method doesn't even get called on the Save() method.

Anyone have any thoughts as to where to look for the error in my code?





ajj3085 replied on Monday, July 03, 2006

Do what the compiler says..

Instead of your create being private void, it probably should be protected override..

Andy

brettswift replied on Monday, July 03, 2006

My creates in several other classes have the same signature, private void, and they work perfectly.

Copyright (c) Marimer LLC