MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

EditableRoot Question #400

Open HutchCPI opened 7 years ago

HutchCPI commented 7 years ago

Hello all,

I am a fairly new developer that has been thrown into a fairly large project and had a quick question on EditableRoot. I am forming a business layer for a Rolodex in which I keep getting an error with this pregenerated piece of code:

    [Transactional(TransactionalTypes.TransactionScope)]
    protected override void DataPortal_DeleteSelf()
    {
        DataPortal_Delete(this.VendorId);
    }

The error is specifically happening on the (this.VendorId); It previously was listed as this.Id but also showed as an error that I switched for a property I inserted under Business Methods. It's asking for a method but I am not sure what I should be looking for. As I stated at the beginning. I am fairly new still (2 months hired) and been thrown into the fire. Just looking for some help.

Thanks, Hutch

rockfordlhotka commented 7 years ago

The DataPortal_Delete method will expect the primary key value for the underlying object's data - so typically the id of the database record representing the object.