In order to add new threads or reply to existing posts, you have to be logged-in. If you are not registered yet, you need to register first, and then login with your personal credentials.
Hello everybody,
when I build my solutions, the compiler show me this error message: 'Csla.Data.SafeDataReader' does not contain a definition for 'GetSystem'
This is caused by this code: private void FetchObject(SafeDataReader dr) { _catalogId = dr.GetGuid("CatalogID"); _lastModified.Date = dr.GetDateTime("CatalogLastModified"); _id = dr.GetSystem.Guid("Id"); MarkOld(); } On line: id = dr.GetSystem.Guid("Id");
If replace the dr.GetSystem.Guid("Id") por id = dr.GetGuid("Id"); the code compile with success.
But if, I generate the objects again, this code is generated with this error.
This is a BUG?
Somebody can help me.
Thanks
Rogerio
Rogerio,
as you can see in the generated code, CslaFactory's BusinessObjects always get an Id-field (CatalogId). You do not need to model another Id-field manually. However, System.Guid is not recognized by the CTP version. The current (developement) version already uses a(n extensible) PropertyConversionProvider to map property types. I will explain that in detail as soon as we ship the beta version - so hold on.
Fortunately, as long as you stop modelling your own Id-fields and use CslaFactory's references to connect BusinessObjects to each other, you won't need System.Guids. Just let the factory do it for you.
Marcel